]> git.sesse.net Git - vlc/commitdiff
update: fix memory leak (cid #1100857)
authorRémi Duraffort <ivoire@videolan.org>
Mon, 25 Nov 2013 18:26:52 +0000 (19:26 +0100)
committerRémi Duraffort <ivoire@videolan.org>
Mon, 25 Nov 2013 22:00:36 +0000 (23:00 +0100)
src/misc/update.c

index 600e900262af2d6f6897f62ad5abe93ffc4e7ba3..4a1a128e7ec6d10a26d1e9695f19d89f75f445d0 100644 (file)
@@ -343,6 +343,7 @@ static bool GetUpdateFile( update_t *p_update )
         p_hash[1] != sign.hash_verification[1] )
     {
         msg_Warn( p_update->p_libvlc, "Bad SHA1 hash for status file" );
+        free( p_hash );
         goto error;
     }
 
@@ -350,6 +351,7 @@ static bool GetUpdateFile( update_t *p_update )
             != VLC_SUCCESS )
     {
         msg_Err( p_update->p_libvlc, "BAD SIGNATURE for status file" );
+        free( p_hash );
         goto error;
     }