From d8f98a5f200a75803c8eb2d69bf58bd45322136d Mon Sep 17 00:00:00 2001 From: Tim Kourt Date: Wed, 23 Oct 2019 13:23:59 -0700 Subject: [PATCH] hotspot: Fix mem leak on failed hotspot config --- src/hotspot.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/hotspot.c b/src/hotspot.c index 60a2e2de..fc2a00f0 100644 --- a/src/hotspot.c +++ b/src/hotspot.c @@ -423,13 +423,12 @@ static void hs20_dir_watch_cb(const char *filename, } config = hs20_config_new(new, full_path); - if (!config) - break; - - l_queue_push_head(hs20_settings, config); - l_settings_free(new); + if (!config) + return; + + l_queue_push_head(hs20_settings, config); break; case L_DIR_WATCH_EVENT_REMOVED: config = l_queue_remove_if(hs20_settings, match_filename,