summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormbkma <[email protected]>2021-03-28 10:16:13 +0200
committerRobert Antoni Buj Gelonch <[email protected]>2021-03-29 11:58:18 +0200
commit9e3ec7d1ff7b963232d02766e42c766582eeeaad (patch)
tree34b9d7d864a7571e3edaf64f66dcbb2ad7868314 /src
parent48adacf130c09e96cf1fd7c391d4584c86644812 (diff)
downloadmate-notification-daemon-9e3ec7d1ff7b963232d02766e42c766582eeeaad.tar.bz2
mate-notification-daemon-9e3ec7d1ff7b963232d02766e42c766582eeeaad.tar.xz
engines.c: fix memory leak
Diffstat (limited to 'src')
-rw-r--r--src/daemon/engines.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/daemon/engines.c b/src/daemon/engines.c
index 305604e..daceaf7 100644
--- a/src/daemon/engines.c
+++ b/src/daemon/engines.c
@@ -181,7 +181,7 @@ static ThemeEngine* get_theme_engine(void)
}
char* enginename = g_settings_get_string(gsettings, GSETTINGS_KEY_THEME);
- if (enginename == NULL)
+ if (enginename == NULL || *enginename == '\0')
{
active_engine = load_theme_engine("standard");
g_assert(active_engine != NULL);
@@ -196,10 +196,10 @@ static ThemeEngine* get_theme_engine(void)
active_engine = load_theme_engine("standard");
}
- g_free(enginename);
-
g_assert(active_engine != NULL);
}
+
+ g_free(enginename);
}
return active_engine;