]> git.sesse.net Git - vlc/commitdiff
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 af3181def1d136aed93f21ce747d253c43c76185..bc2c4aa97fef544bf455c4fe70d9d13f513b95d2 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;
     }