projects
/
tinc
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8420a0c
)
Move initialization of char *priority up to prevent freeing an uninitialized pointer.
author
Guus Sliepen
<guus@tinc-vpn.org>
Tue, 21 Feb 2012 10:39:21 +0000
(11:39 +0100)
committer
Guus Sliepen
<guus@tinc-vpn.org>
Tue, 21 Feb 2012 10:39:21 +0000
(11:39 +0100)
src/tincd.c
patch
|
blob
|
history
diff --git
a/src/tincd.c
b/src/tincd.c
index
f7b956f
..
c5f4c10
100644
(file)
--- a/
src/tincd.c
+++ b/
src/tincd.c
@@
-586,6
+586,7
@@
int main2(int argc, char **argv) {
InitializeCriticalSection(&mutex);
EnterCriticalSection(&mutex);
#endif
InitializeCriticalSection(&mutex);
EnterCriticalSection(&mutex);
#endif
+ char *priority = NULL;
if(!detach())
return 1;
if(!detach())
return 1;
@@
-612,8
+613,6
@@
int main2(int argc, char **argv) {
/* Change process priority */
/* Change process priority */
- char *priority = NULL;
-
if(get_config_string(lookup_config(config_tree, "ProcessPriority"), &priority)) {
if(!strcasecmp(priority, "Normal")) {
if (setpriority(NORMAL_PRIORITY_CLASS) != 0) {
if(get_config_string(lookup_config(config_tree, "ProcessPriority"), &priority)) {
if(!strcasecmp(priority, "Normal")) {
if (setpriority(NORMAL_PRIORITY_CLASS) != 0) {