On Aug 26, 2013, at 3:13 PM, Per Øyvind Karlsen wrote:

> The following patch fixes a couple of minor memleaks.
> 

The first patch indicates Yet Again that the patch isn't/wasn'yt
for @rpm5.org code. Please send proper patches.

There is an attempt to free the malloc'd memory, which
means that all occurrences of rpmEVRparse() need to be examined.
I will do this routinely the next time I use valgrind on rpm.
You can speed up the adoption by including an explicit reproducer
because what I do and you do likely are covering very different code paths.

The 2nd problem/patch has been reported by Denis Silakov
and responded to at http://launchpad.net/rpm.

The short answer is that the behavior depends on how popt is compiled,
and whether argv arrays are contiguous (as "tradiotionally" implemented
in RPM) or are sparse (as most programmers expect), determines
what RPM needs to do to avoid memleaks.

Apply the patch turns a memleak into a double free if/when
popt is compiled "traditionally" with argv arrays as a contiguous area.


> --
> Regards,
> Per Øyvind
> <rpm-5.4.7-fix-minor-memleaks.patch>

______________________________________________________________________
RPM Package Manager                                    http://rpm5.org
Developer Communication List                        rpm-devel@rpm5.org

Reply via email to