[vlc-commits] Fix potential double free (cid #1047496 and #1047497)

Rémi Duraffort git at videolan.org
Thu Aug 8 20:59:43 CEST 2013


vlc/vlc-2.0 | branch: master | Rémi Duraffort <ivoire at videolan.org> | Sat Jul 13 08:13:35 2013 +0200| [df241141026dd87bf7d4dceddbfdb91ca515db2f] | committer: Rémi Denis-Courmont

Fix potential double free (cid #1047496 and #1047497)

(cherry picked from commit 873c7e91207545aeaba931143c4e8d1de0640813)
Signed-off-by: Rémi Denis-Courmont <remi at remlab.net>

Conflicts:
	modules/access/directory.c

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=df241141026dd87bf7d4dceddbfdb91ca515db2f
---

 modules/access/directory.c |    5 -----
 1 file changed, 5 deletions(-)

diff --git a/modules/access/directory.c b/modules/access/directory.c
index 4fcc872..2c00d34 100644
--- a/modules/access/directory.c
+++ b/modules/access/directory.c
@@ -283,8 +283,6 @@ block_t *DirBlock (access_t *p_access)
                 goto fatal;
 
             block_t *block = block_heap_Alloc (footer, footer, len);
-            if (unlikely(block == NULL))
-                free (footer);
             p_access->info.b_eof = true;
             return block;
         }
@@ -436,10 +434,7 @@ notdir:
 
     block_t *block = block_heap_Alloc (entry, entry, len);
     if (unlikely(block == NULL))
-    {
-        free (entry);
         goto fatal;
-    }
     return block;
 
 fatal:



More information about the vlc-commits mailing list