[PATCH] Fix 53360 - String leak in DCOPClient

Ravikiran Rajagopal ravi at ee.eng.ohio-state.edu
Sat Mar 8 22:46:14 GMT 2003


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,
  The following patch fixes bug 53360 for me. However, I am not familiar with 
the internals of DCOPClient; it is possible that this patch is unnecessary 
(in which case it is harmless). Is it ok to commit? On a related note, is it 
ok to send messages like this (regarding kdelibs fixes) to kde-core-devel or 
should I use kde-devel for this?

Thanks,
Ravi

Index: dcopclient.cpp
===================================================================
RCS file: /home/kde/kdelibs/dcop/dcopclient.cpp,v
retrieving revision 1.156
diff -u -p -r1.156 dcopclient.cpp
- --- dcopclient.cpp      11 Feb 2003 15:55:56 -0000      1.156
+++ dcopclient.cpp      8 Mar 2003 22:29:00 -0000
@@ -502,6 +502,8 @@ DCOPClient::DCOPClient()
     d->qt_bridge_enabled = true;
     d->transactionList = 0L;
     d->transactionId = 0;
+    d->vendor = 0L;
+    d->release = 0L;
     QObject::connect( &d->postMessageTimer, SIGNAL( timeout() ), this, SLOT( 
processPostedMessagesInternal() ) );

     if ( !mainClient() )
@@ -517,6 +519,11 @@ DCOPClient::~DCOPClient()
     if (d->registered)
        unregisterLocalClient( d->appId );

+    if (d->vendor)
+       free(d->vendor);
+    if (d->release)
+       free(d->release);
+
     delete d->notifier;
     delete d->transactionList;
     delete d;
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE+anK/bI8Y8y0oVXcRArLAAJ0T5TRqfLVi083EJZC+pvT+0UhMzACeJnyx
zah0pPl7M/ZLrMhiD75dkZ8=
=i2Zz
-----END PGP SIGNATURE-----





More information about the kde-core-devel mailing list