synaptic-devel
[Top][All Lists]
Advanced

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

Re: [Synaptic-devel] Strange segfault


From: Sviataslau Svirydau
Subject: Re: [Synaptic-devel] Strange segfault
Date: Fri, 16 Apr 2004 18:13:23 +0300
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040310

Gustavo Niemeyer wrote:

Yeah! That really helped! But how does the pkgSourceList destructor gets called before the lists are refreshed? Is there any way to eliminate the memory leak as well?
Sure it *can* be fixed but that's going to have to wait for another day :)
(or until "somebody" else fixes it - that's why I cc'd Gustavo)

I'll have a look at this ASAP.

This will lead to memory leaks.
We are using attached patch. I've also reported about it sometime ago on irc :) However, it's not a real solution, but quick hack. It simply replaces pointers with good values. To make correct patch apt library redesign is needed.

--
Regards,
Sviatoslav Sviridov <Sviataslau_Svirydau at epam.com>
phone:  +375 17 210 1662, ext. 1302
mobile: +375 29 641 4214
--
A language that doesn't have everything is actually easier to program
in than some that do.
                -- Dennis M. Ritchie

diff -uprk.orig apt-0.5.15cnc5.orig/apt-pkg/rpm/rpmindexfile.cc 
apt-0.5.15cnc5/apt-pkg/rpm/rpmindexfile.cc
--- apt-0.5.15cnc5.orig/apt-pkg/rpm/rpmindexfile.cc     2003-12-23 23:19:55 
+0300
+++ apt-0.5.15cnc5/apt-pkg/rpm/rpmindexfile.cc  2004-01-19 16:13:47 +0300
@@ -638,7 +638,8 @@ class rpmSLTypeGen : public pkgSourceLis
         {       
            // The registered object has no vendor, but the new one does
            // so, we make the previous one have the vendor too.
-           if ((*iter)->Vendor == NULL && Vendor != NULL)
+           if (Vendor != NULL
+                       && ((*iter)->Vendor == NULL || (*iter)->Vendor != 
Vendor))
               (*iter)->Vendor = Vendor;
            return *iter;
         }

reply via email to

[Prev in Thread] Current Thread [Next in Thread]