[vlc-commits] plugin cache: fix memory leaks

Hannes Domani git at videolan.org
Thu Aug 27 18:49:58 CEST 2015


vlc | branch: master | Hannes Domani <ssbssa at yahoo.de> | Thu Aug 27 16:18:23 2015 +0200| [26e38c7daa8484497ce256797d7f81af71e7e9a5] | committer: Jean-Baptiste Kempf

plugin cache: fix memory leaks

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 src/modules/bank.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/modules/bank.c b/src/modules/bank.c
index 142657e..19292e6 100644
--- a/src/modules/bank.c
+++ b/src/modules/bank.c
@@ -411,6 +411,9 @@ static void AllocatePluginPath (vlc_object_t *p_this, const char *path,
                 free (cache[i].path);
             }
             free( cache );
+            for (size_t i = 0; i < bank.i_cache; i++)
+                free (bank.cache[i].path);
+            free (bank.cache);
             break;
         case CACHE_RESET:
             CacheSave (p_this, path, bank.cache, bank.i_cache);



More information about the vlc-commits mailing list