[Toybox] Patch memory leak in tar.c

Chris Sarra chrissarra at google.com
Wed Aug 19 14:58:29 PDT 2020


Hi Rob and toybox Users,
I'm a newcomer to this email list, so if I'm using incorrect patch formats
or should be emailing in a different way, please let me know.

In looking at tar.c, I noticed that, while parsing files, for the symlink
case there are two calls to xreadlink(). Both calls allocate a new char*,
but only one is ever freed.
I've attached a git diff to fix this. Please let me know if there's
anything else I should do to patch this.

Thanks!
+Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20200819/75fab78c/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Patch-out-memory-leak-in-tar.c.patch
Type: application/octet-stream
Size: 643 bytes
Desc: not available
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20200819/75fab78c/attachment.obj>


More information about the Toybox mailing list