]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
channel: fix channel_get_icon() - memory leak and handling
authorJaroslav Kysela <perex@perex.cz>
Wed, 19 Nov 2014 14:23:27 +0000 (15:23 +0100)
committerJaroslav Kysela <perex@perex.cz>
Wed, 19 Nov 2014 14:23:27 +0000 (15:23 +0100)
src/channels.c

index 2d29c1d4765141de8898fae6ccdf5b1031e46354..047d8aa31dd2a3ed36a8ea5cbcb4148b9db7c10d 100644 (file)
@@ -662,7 +662,7 @@ channel_get_icon ( channel_t *ch )
           continue;
         snprintf(buf2, sizeof(buf2), "%s/%s", picon, icn+8);
         if (i > 1 || check_file(buf2)) {
-          ch->ch_icon = strdup(icn);
+          icon = ch->ch_icon = strdup(icn);
           channel_save(ch);
           idnode_notify_simple(&ch->ch_id);
           break;