hds: fix stale pointer
authorRémi Denis-Courmont <remi@remlab.net>
Wed, 20 Aug 2014 18:29:55 +0000 (21:29 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Wed, 20 Aug 2014 18:29:55 +0000 (21:29 +0300)
modules/stream_filter/hds/hds.c

index af3181d..bc2c4aa 100644 (file)
@@ -762,6 +762,8 @@ static uint8_t* download_chunk( stream_t *s,
         msg_Err( s, "Requested %"PRIi64" bytes, "\
                  "but only got %d", size, read );
         data = realloc( chunk->data, read );
+        if( data != NULL )
+            chunk->data = data;
         chunk->failed = true;
         return NULL;
     }