Free arg before returning, or it'll leak
This commit is contained in:
parent
ff72f5426e
commit
b110332ed3
@ -657,9 +657,12 @@ HANDLE_FUNC(handle_loglevel)
|
|||||||
for (i = 0; i != nlevels; ++i) {
|
for (i = 0; i != nlevels; ++i) {
|
||||||
if (!strcasecmp(arg, log_levels[i].string)) {
|
if (!strcasecmp(arg, log_levels[i].string)) {
|
||||||
set_log_level(log_levels[i].level);
|
set_log_level(log_levels[i].level);
|
||||||
|
safefree(arg);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
safefree(arg);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user