[vlc-commits] vlmshell: Free dynamically allocated ptr array

Matthew Whitworth git at videolan.org
Sun Mar 18 18:40:44 CET 2018


vlc/vlc-3.0 | branch: master | Matthew Whitworth <mwhitworth at gmail.com> | Sun Mar 18 17:25:22 2018 +0000| [02f9dda4d7af997eb44938cc7c4742b28e0d6b6a] | committer: Rémi Denis-Courmont

vlmshell: Free dynamically allocated ptr array

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

Signed-off-by: Rémi Denis-Courmont <remi at remlab.net>
(cherry picked from commit e23256dbfd7795235c188d4934ec3f0386d8d461)
Signed-off-by: Rémi Denis-Courmont <remi at remlab.net>

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

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



More information about the vlc-commits mailing list