vlc | branch: master | Hugo Beauzée-Luyssen <[email protected]> | Wed Nov 25 
16:55:28 2020 +0100| [ce1a28b094c6679f5e513c134c2692efd41de9e1] | committer: 
Hugo Beauzée-Luyssen

input: Also free empty attachments arrays

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

 src/input/input.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/input/input.c b/src/input/input.c
index 360e1fa9a9..5294603e0d 100644
--- a/src/input/input.c
+++ b/src/input/input.c
@@ -3038,8 +3038,10 @@ static void AppendAttachment( input_thread_t *p_input, 
int i_new,
     int i;
 
     if ( i_attachment + i_new == 0 )
-        /* nothing to do */
+    {
+        free( pp_new );
         return;
+    }
 
     input_attachment_t **pp_att = realloc( priv->attachment,
                     sizeof(*pp_att) * ( i_attachment + i_new ) );

_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to