]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
- Fix - buf is assigned to to cm->cm_data with is defined 'uint8_t cm_data[CWS_NETMS...
authorBenny Morgan <benny@zuragon.com>
Sun, 30 Jun 2013 19:49:08 +0000 (21:49 +0200)
committerAdam Sutton <dev@adamsutton.me.uk>
Thu, 11 Jul 2013 19:16:02 +0000 (20:16 +0100)
(cherry picked from commit 61491f394a92bfe20b18b61d2a130bf3a670efdc)

src/cwc.c
src/filebundle.c

index 7308a1792f2b5b04ee8c7ebf17dad604d8e75541..afdb51eb35245f68c15fbb7ea538a98ffaf17d17 100644 (file)
--- a/src/cwc.c
+++ b/src/cwc.c
@@ -497,7 +497,6 @@ cwc_send_msg(cwc_t *cwc, const uint8_t *msg, size_t len, int sid, int enq)
   buf[5] = sid;
 
   if((len = des_encrypt(buf, len, cwc)) <= 0) {
-    free(buf);
     free(cm);
     return -1;
   }
index 295ed00fa1a27f676fbff8df1bc6912338f5fd50..0ea7f324f4e0eba04088b99dc64a92c3990706c4 100644 (file)
@@ -78,18 +78,16 @@ static uint8_t *_fb_inflate ( const uint8_t *data, size_t size, size_t orig )
 {
   int err;
   z_stream zstr;
-  uint8_t *bufin, *bufout;
+  uint8_t *bufout;
 
   /* Setup buffers */
-  bufin  = malloc(size);
   bufout = malloc(orig);
-  memcpy(bufin, data, size);
 
   /* Setup zlib */
   memset(&zstr, 0, sizeof(zstr));
   inflateInit2(&zstr, 31);
   zstr.avail_in  = size;
-  zstr.next_in   = bufin;
+  zstr.next_in   = data;
   zstr.avail_out = orig;
   zstr.next_out  = bufout;
     
@@ -99,7 +97,7 @@ static uint8_t *_fb_inflate ( const uint8_t *data, size_t size, size_t orig )
     free(bufout);
     bufout = NULL;
   }
-  free(bufin);
+
   inflateEnd(&zstr);
   
   return bufout;