RPM

Mem leaks in build/parseReqs.c and rpmio/macro.c

Bug #1046804 reported by Denis Silakov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
RPM
New
Undecided
Unassigned

Bug Description

There seem to be a couple of minor memory leaks in rpm5 which are fixed in ROSA/MDV by a separate patch (see attachment).

Are there any reason not to merge this patch upstream?

Revision history for this message
Denis Silakov (dsilakov) wrote :
Revision history for this message
Jeff Johnson (n3npq) wrote :

There are deeper design issues here (and affecting POPT as well as RPM).

Traditionally, POPT (and the code swiped into RPM) allocated an argv
array contiguosly with strings following the pointer array. So there
was no need for the attached patch.

Because of "legacy compatibility", the change to meet developer expectations
for argv handling (as passed into main()) is tricky/risky (because if argv is contiguous
there SHOPULD be only a single free) and depends intimately on how rpm is built.

Meanwhile the # of bytes involved is quite small, and technically this isn't a "leak"
but rather 1-time allocations that aren't free'd.

No idea what the proper fix is: all depends on the glacially slow transition rate.

Jeff Johnson (n3npq)
tags: added: memleak rpmbuild
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.