Move initialization of char *priority up to prevent freeing an uninitialized pointer.
This commit is contained in:
parent
8420a0c8bd
commit
7d76e28759
1 changed files with 1 additions and 2 deletions
|
@ -586,6 +586,7 @@ int main2(int argc, char **argv) {
|
||||||
InitializeCriticalSection(&mutex);
|
InitializeCriticalSection(&mutex);
|
||||||
EnterCriticalSection(&mutex);
|
EnterCriticalSection(&mutex);
|
||||||
#endif
|
#endif
|
||||||
|
char *priority = NULL;
|
||||||
|
|
||||||
if(!detach())
|
if(!detach())
|
||||||
return 1;
|
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(get_config_string(lookup_config(config_tree, "ProcessPriority"), &priority)) {
|
||||||
if(!strcasecmp(priority, "Normal")) {
|
if(!strcasecmp(priority, "Normal")) {
|
||||||
if (setpriority(NORMAL_PRIORITY_CLASS) != 0) {
|
if (setpriority(NORMAL_PRIORITY_CLASS) != 0) {
|
||||||
|
|
Loading…
Reference in a new issue