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

Re: The rollback saga continues...



On Thu, 5 Jun 2003, Jeff Johnson wrote:

> > > >                 (fnpyKey) rpn, 1, NULL);
> > > ----------------------------^^^
> > > 
> > > This needs changing somehow.
> > I am not sure that I follow you?
> 
> Trace the code paths for the variable "rpn", something is wrong.
> 
> It's up to you, not rpmlib, to handle free, as rpm has no idea what
> is underneath the (fnpyKey), it's just an address that, if freed
> while still refernced in rpmts (actually rpmal), would explain everything.
>
No need to do all that.  I was freeing, and I knew where.  I commented 
out the code and the automatic rollback worked (...much testing required 
yet (-;).  Basically, I created a subroutine that given an rpmte it would
search for its repackaged package.  I was malloc'ing the space for the
repackage package's name (rpn), and dutifully freeing it...sigh.

The thing I don't know how to do then is make sure that the memory gets 
freeed.  I suppose I could free it in the function that runs the rollback;
walk through the rpmte's and if their package key was not null free it.
Bother.  You wouldn't happen to have a better idea?

Cheers...james




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