[vlc-devel] [PATCH 3/6] plugin cache: fix memory leaks

Hannes Domani ssbssa at yahoo.de
Thu Aug 27 16:18:23 CEST 2015


---
 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);
-- 
2.5.0



More information about the vlc-devel mailing list