[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: Re: branches/KDE/3.5/kdelibs/kio
From: George Staikos <staikos () kde ! org>
Date: 2007-05-08 14:16:53
Message-ID: 4DFB0F8E-B33D-4C04-9170-33FA3F8F53D6 () kde ! org
[Download RAW message or body]
Nice catch, thanks! I'm rather amazed I didn't find this before.
On 7-May-07, at 3:26 PM, David Faure wrote:
> SVN commit 662342 by dfaure:
>
> getChain() returns a list of new'ed KSSLCertificates, so any caller
> of getChain() needs to make sure the items are deleted, otherwise
> we leak memory.
> Bug found while porting the code to kde4 :)
> CCMAIL: staikos@kde.org
>
>
> M +3 -3 kfile/kurlcombobox.h
> M +1 -0 kio/tcpslavebase.cpp
> M +1 -0 kssl/ksslinfodlg.cc
>
> --- branches/KDE/3.5/kdelibs/kio/kio/tcpslavebase.cpp #662341:662342
> @@ -815,6 +815,7 @@
> if (pc.chain().isValid() && pc.chain().depth() > 1) {
> QString theChain;
> QPtrList<KSSLCertificate> chain = pc.chain().getChain();
> + chain.setAutoDelete(true);
> for (KSSLCertificate *c = chain.first(); c; c = chain.next
> ()) {
> theChain += c->toString();
> theChain += "\n";
> --- branches/KDE/3.5/kdelibs/kio/kssl/ksslinfodlg.cc #662341:662342
> @@ -193,6 +193,7 @@
> d->_chain->insertItem(i18n("0 - Site Certificate"));
> int cnt = 0;
> QPtrList<KSSLCertificate> cl = cert->chain().getChain();
> + cl.setAutoDelete(true);
> for (KSSLCertificate *c = cl.first(); c != 0; c = cl.next
> ()) {
> KSSLX509Map map(c->getSubject());
> QString id;
--
George Staikos
KDE Developer http://www.kde.org/
Staikos Computing Services Inc. http://www.staikos.net/
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic