sticker: fix a memory leak
This commit is contained in:
parent
affb4bd923
commit
d5684f7444
@ -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 */
|
||||||
|
Loading…
Reference in New Issue
Block a user