[Rpm-maint] [rpm-software-management/rpm] rpmbuild: %patch: fix a memory leak (#873)

Panu Matilainen notifications at github.com
Tue Oct 1 12:03:27 UTC 2019


The other alternative would be just dropping opt_P entirely.
It also still leaks if multiple -b, -z, -d etc are passed. Unlike -P it doesn't make sense but it's not prevented either.

I remember seeing these kinds of leaks but shrugging them off as a popt issue based on an ancient comment to that effect in bugzilla somewhere, apparently without ever properly looking into it... The codebase seems to expect popt to free the arguments set via POPT_ARG_STRING and so the "target" variables are declared const (incidentally not here, but most of the places), but it doesn't. So we have these kind of leaks all over librpmbuild :(

Thanks for looking into it and the patch. As this here is just a tip of the iceberg, I'll better think a bit on how to approach fixing en-masse before applying this.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/873#issuecomment-537004414
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20191001/713bf5bf/attachment.html>


More information about the Rpm-maint mailing list