[vlc-commits] keystore test: fix invalid free

Thomas Guillem git at videolan.org
Tue Feb 2 18:07:06 CET 2016


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Tue Feb  2 18:06:50 2016 +0100| [e6ea1bfbfc453a058b84b9509ec8375db8471a20] | committer: Thomas Guillem

keystore test: fix invalid free

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

 test/modules/keystore/test.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/test/modules/keystore/test.c b/test/modules/keystore/test.c
index 45ef74f..4a7aea2 100644
--- a/test/modules/keystore/test.c
+++ b/test/modules/keystore/test.c
@@ -85,7 +85,8 @@ ks_find(vlc_keystore *p_keystore, const char *const ppsz_values[KEY_MAX],
             assert(strcmp(psz_value1, psz_value2) == 0);
         }
     }
-    vlc_keystore_release_entries(p_entries, i_entries);
+    if (i_entries > 0)
+        vlc_keystore_release_entries(p_entries, i_entries);
     return i_entries;
 }
 



More information about the vlc-commits mailing list