[vlc-commits] dsm: Fix use after free

Hugo Beauzée-Luyssen git at videolan.org
Mon Feb 15 12:17:46 CET 2016


vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Mon Feb 15 12:16:08 2016 +0100| [bac5fbe240c1482630f6667b5a6e6fd3051fe128] | committer: Hugo Beauzée-Luyssen

dsm: Fix use after free

cid #1352643

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

 modules/access/dsm/access.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/modules/access/dsm/access.c b/modules/access/dsm/access.c
index 6aa60e7..3fcfe46 100644
--- a/modules/access/dsm/access.c
+++ b/modules/access/dsm/access.c
@@ -256,9 +256,12 @@ static int get_address( access_t *p_access )
                 struct sockaddr_in *in = (struct sockaddr_in *)p_info->ai_addr;
                 p_sys->addr.s_addr = in->sin_addr.s_addr;
             }
-            freeaddrinfo( p_info );
             if( p_info->ai_family != AF_INET )
+            {
+                freeaddrinfo( p_info );
                 return VLC_EGENERIC;
+            }
+            freeaddrinfo( p_info );
         }
         else
             return VLC_EGENERIC;



More information about the vlc-commits mailing list