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

Rémi Duraffort git at videolan.org
Sat Jul 13 08:43:16 CEST 2013


vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Sat Jul 13 08:13:35 2013 +0200| [873c7e91207545aeaba931143c4e8d1de0640813] | committer: Rémi Duraffort

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

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

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

diff --git a/modules/access/directory.c b/modules/access/directory.c
index f929315..71a446b 100644
--- a/modules/access/directory.c
+++ b/modules/access/directory.c
@@ -299,8 +299,6 @@ block_t *DirBlock (access_t *p_access)
                 goto fatal;
 
             block_t *block = block_heap_Alloc (footer, len);
-            if (unlikely(block == NULL))
-                free (footer);
             p_access->info.b_eof = true;
             return block;
         }
@@ -452,10 +450,7 @@ notdir:
 
     block_t *block = block_heap_Alloc (entry, len);
     if (unlikely(block == NULL))
-    {
-        free (entry);
         goto fatal;
-    }
     return block;
 
 fatal:



More information about the vlc-commits mailing list