[Rpm-maint] [rpm-software-management/rpm] Fix POPT_ARG_STRING memleaks in librpmbuild (#1041)

Panu Matilainen notifications at github.com
Mon Feb 3 12:58:36 UTC 2020


popt always returned malloc'ed memory for POPT_ARG_STRING items, but
for whatever historical reason rpm systematically passed const char *
pointers as targets, making them look non-freeable. Besides changing
just the types and adding free()'s, const-correctness requires extra
tweaks as there's mixed use from string literals and poptGetArg() which
does return const pointers.
You can view, comment on, or merge this pull request online at:

  https://github.com/rpm-software-management/rpm/pull/1041

-- Commit Summary --

  * Fix POPT_ARG_STRING memleaks in librpmbuild

-- File Changes --

    M build/parseDescription.c (11)
    M build/parseFiles.c (5)
    M build/parsePolicies.c (5)
    M build/parsePrep.c (6)
    M build/parseScript.c (11)
    M build/policies.c (2)

-- Patch Links --

https://github.com/rpm-software-management/rpm/pull/1041.patch
https://github.com/rpm-software-management/rpm/pull/1041.diff

-- 
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/1041
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20200203/77229b37/attachment-0001.html>


More information about the Rpm-maint mailing list