glutls: fix potential memleak.
authorRémi Duraffort <ivoire@videolan.org>
Sat, 4 Jul 2009 12:04:42 +0000 (14:04 +0200)
committerRémi Duraffort <ivoire@videolan.org>
Sat, 4 Jul 2009 12:04:42 +0000 (14:04 +0200)
modules/misc/gnutls.c

index 7a0a18a..a718278 100644 (file)
@@ -563,7 +563,10 @@ gnutls_Addx509Directory( vlc_object_t *p_this,
             break;
 
         if ((strcmp (ent, ".") == 0) || (strcmp (ent, "..") == 0))
+        {
+            free( ent );
             continue;
+        }
 
         char path[strlen (psz_dirname) + strlen (ent) + 2];
         sprintf (path, "%s"DIR_SEP"%s", psz_dirname, ent);