[vlc-commits] codec: opus: fix comment leak
Francois Cartegnie
git at videolan.org
Thu Dec 8 11:59:22 CET 2016
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Dec 8 11:14:57 2016 +0100| [e514b6b4f97983969dc613254372d12855f7e58c] | committer: Francois Cartegnie
codec: opus: fix comment leak
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e514b6b4f97983969dc613254372d12855f7e58c
---
modules/codec/opus_header.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/modules/codec/opus_header.c b/modules/codec/opus_header.c
index 34ff5bb..08dd5db 100644
--- a/modules/codec/opus_header.c
+++ b/modules/codec/opus_header.c
@@ -376,7 +376,7 @@ int opus_write_header(uint8_t **p_extra, int *i_extra, OpusHeader *header, const
const int packet_size = opus_header_to_packet(header, header_data,
sizeof(header_data));
- unsigned char *data[2];
+ const unsigned char *data[2];
size_t size[2];
data[0] = header_data;
@@ -415,6 +415,8 @@ int opus_write_header(uint8_t **p_extra, int *i_extra, OpusHeader *header, const
}
}
+ free(comments);
+
return 0;
}
More information about the vlc-commits
mailing list