1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-11-03 19:37:16 -05:00

Free strings in prefs_load

This commit is contained in:
James Booth 2015-08-09 00:20:17 +01:00
parent 103f80c227
commit 8531357e88

View File

@ -113,6 +113,7 @@ prefs_load(void)
} else if (g_strcmp0(time, "off") == 0) {
g_key_file_set_string(prefs, PREF_GROUP_UI, "time", "");
}
prefs_free_string(time);
}
if (g_key_file_has_key(prefs, PREF_GROUP_UI, "time.statusbar", NULL)) {
char *time = g_key_file_get_string(prefs, PREF_GROUP_UI, "time.statusbar", NULL);
@ -123,6 +124,7 @@ prefs_load(void)
} else if (g_strcmp0(time, "off") == 0) {
g_key_file_set_string(prefs, PREF_GROUP_UI, "time.statusbar", "");
}
prefs_free_string(time);
}
_save_prefs();