[vlc-devel] [PATCH] vlmshell: Free dynamically allocated ptr array

Matthew Whitworth mwhitworth at gmail.com
Sun Mar 18 18:25:22 CET 2018


Fixes #19808. The array of child pointers in the message structure is
dynamically allocated, so this needs to be free'd when we destroy show2
after reparenting its children
---
 src/input/vlmshell.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/input/vlmshell.c b/src/input/vlmshell.c
index 4f812b2d47..51e6a12325 100644
--- a/src/input/vlmshell.c
+++ b/src/input/vlmshell.c
@@ -1535,6 +1535,7 @@ static vlm_message_t *vlm_Show( vlm_t *vlm, vlm_media_sys_t *media,
 
         /* We must destroy the parent node "show" of show2
          * and not the children */
+        free( show2->child );
         free( show2->psz_name );
         free( show2 );
 
-- 
2.14.3



More information about the vlc-devel mailing list