[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Is there a bug in headerFree? (rpm-4.0.3)



On Wed, Jul 04, 2001 at 03:59:10PM +0200, David Odin wrote:
> On Wed, Jul 04, 2001 at 09:16:17AM -0400, Jeff Johnson wrote:
> > On Wed, Jul 04, 2001 at 03:24:54PM +0200, David Odin wrote:
> > > 
> > >   Hi,
> > > 
> > > I'm trying to print all the installed packages.
> > > The following program used to work with rpm-4.0.
> > > Now, it segfault on headerFree().
> > > It works well if I comment out the call to headerFree(), but I guess it then
> > > leaks some memory.
> > > 
> > 
> > No, deleting the headerFree() is the right thing to do, and it won't leak
> > memory.
> > 
> > You don't have to do headerFree() within the scope of rpmdbNextIterator(),
> > as the reference count is owned by the iterator.
> > 
>   The strange things is that this used to work with previous version of rpm.
> 

Not so strange. As part of my "sneaking around in the API", I now aggresively
trash and burn pointers and data in rpm when freeing. Your program never really
worked, always had duplicate frees, but I now punish your sin(s) as best I
can:-)

73 de Jeff

-- 
Jeff Johnson	ARS N3NPQ
jbj@jbj.org	(jbj@redhat.com)
Chapel Hill, NC





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] []