aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJonathan Neuschäfer <j.neuschaefer@gmx.net>2011-07-18 12:47:06 +0200
committerMax Kellermann <max@duempel.org>2011-07-18 22:03:37 +0200
commitd5684f74440fec77b3bc7c80a8396c79e4e489ee (patch)
treed6ced20e2850a6ce4e9fb919b463bf4b404315c8 /src
parentaffb4bd923492913ffebb71c4f977a6bbf9ed257 (diff)
downloadmpd-d5684f74440fec77b3bc7c80a8396c79e4e489ee.tar.gz
mpd-d5684f74440fec77b3bc7c80a8396c79e4e489ee.tar.xz
mpd-d5684f74440fec77b3bc7c80a8396c79e4e489ee.zip
sticker: fix a memory leak
Diffstat (limited to 'src')
-rw-r--r--src/sticker.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/sticker.c b/src/sticker.c
index c59cdd078..f6cd04346 100644
--- a/src/sticker.c
+++ b/src/sticker.c
@@ -579,8 +579,10 @@ sticker_load(const char *type, const char *uri)
bool success;
success = sticker_list_values(sticker->table, type, uri);
- if (!success)
+ if (!success) {
+ sticker_free(sticker);
return NULL;
+ }
if (g_hash_table_size(sticker->table) == 0) {
/* don't return empty sticker objects */