[vlc-devel] [PATCH] avoid crash in imem.c plugin

Abylay Ospan aospan at netup.ru
Wed Aug 23 21:54:05 CEST 2017


p_sys is allocated using vlc_calloc but deleted by regular 'free' call.
This cause 'double free or corruption' crash.
do not delete p_sys here because it will be automatically deallocated by
'vlc_objres_clear' in modules.c
---
 modules/access/imem.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/modules/access/imem.c b/modules/access/imem.c
index d98e764..3496f8a 100644
--- a/modules/access/imem.c
+++ b/modules/access/imem.c
@@ -257,7 +257,6 @@ static int OpenCommon(vlc_object_t *object, imem_sys_t **sys_ptr, const char *ps
 
     if (!sys->source.get || !sys->source.release) {
         msg_Err(object, "Invalid get/release function pointers");
-        free(sys);
         return VLC_EGENERIC;
     }
 
-- 
2.7.4



More information about the vlc-devel mailing list