[vlc-devel] [PATCH] input: Also free empty attachments arrays
Hugo Beauzée-Luyssen
hugo at beauzee.fr
Wed Nov 25 17:15:49 CET 2020
---
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 ) );
--
2.29.2
More information about the vlc-devel
mailing list