[x264-devel] [PATCH] memory leaks in error branches that will probably exit anyway

Adam Richter adamrichter4 at gmail.com
Wed May 15 12:47:20 CEST 2019


The attached patch should fix some some memory leaks in the git
version of x264 that cppcheck found.  Actually, cppcheck complained
about one more potential memory leak, which I am convinced is a false
alarm (output/mp4.c, line 301, p_slot->data).

The apparent memory leaks are all branches that are only called on a
another memory allocation failure.  They probably have never been
executed and probably never will be.

The patch at least compiles.  I have not attempted to test or even run
the resulting code in any way.

Please feel free to merge it if you like, and also please let me know
if I should be following some other process to submit it.

Thanks for your attention to this patch submission.

Adam
-------------- next part --------------
A non-text attachment was scrubbed...
Name: x264-abort-leaks.diff
Type: text/x-patch
Size: 4009 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/x264-devel/attachments/20190515/67122e68/attachment.bin>


More information about the x264-devel mailing list