]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
- Fix memory leak - in case htmsg_binary_des0 return's something < 0, n and f was...
authorBenny Morgan <benny@zuragon.com>
Sun, 30 Jun 2013 19:09:09 +0000 (21:09 +0200)
committerBenny Morgan <benny@zuragon.com>
Sun, 30 Jun 2013 19:09:09 +0000 (21:09 +0200)
src/htsmsg_binary.c

index 6d50a6df7df80f927ee76ec5ccfdf718024ef693..ef4ccf266700023accd7b92ee2de2a8695c9a085 100644 (file)
@@ -97,8 +97,11 @@ htsmsg_binary_des0(htsmsg_t *msg, const uint8_t *buf, size_t len)
       sub = &f->hmf_msg;
       TAILQ_INIT(&sub->hm_fields);
       sub->hm_data = NULL;
-      if(htsmsg_binary_des0(sub, buf, datalen) < 0)
-       return -1;
+      if(htsmsg_binary_des0(sub, buf, datalen) < 0) {
+        free(n);
+        free(f);
+        return -1;
+      }
       break;
 
     default: