Commit d5684f74 authored by Jonathan Neuschäfer's avatar Jonathan Neuschäfer Committed by Max Kellermann

sticker: fix a memory leak

parent affb4bd9
...@@ -579,8 +579,10 @@ sticker_load(const char *type, const char *uri) ...@@ -579,8 +579,10 @@ sticker_load(const char *type, const char *uri)
bool success; bool success;
success = sticker_list_values(sticker->table, type, uri); success = sticker_list_values(sticker->table, type, uri);
if (!success) if (!success) {
sticker_free(sticker);
return NULL; return NULL;
}
if (g_hash_table_size(sticker->table) == 0) { if (g_hash_table_size(sticker->table) == 0) {
/* don't return empty sticker objects */ /* don't return empty sticker objects */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment