Free arg before returning, or it'll leak

This commit is contained in:
Mukund Sivaraman 2008-03-30 17:56:45 -07:00
parent ff72f5426e
commit b110332ed3

View File

@ -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;
} }