From b110332ed3ba89bb4d4c9e9864b9765d2e6e0431 Mon Sep 17 00:00:00 2001 From: Mukund Sivaraman Date: Sun, 30 Mar 2008 17:56:45 -0700 Subject: Free arg before returning, or it'll leak --- src/conffile.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/conffile.c b/src/conffile.c index 18f19fe..3c64603 100644 --- a/src/conffile.c +++ b/src/conffile.c @@ -657,9 +657,12 @@ HANDLE_FUNC(handle_loglevel) for (i = 0; i != nlevels; ++i) { if (!strcasecmp(arg, log_levels[i].string)) { set_log_level(log_levels[i].level); + safefree(arg); return 0; } } + + safefree(arg); return -1; } -- cgit v1.2.3