[evolution-patches] fix for memory leaks in soup-soap-message



attached patch frees the members of SoupSoapMessagePriv  structure
before priv gets freed

Thanks,
Sivaiah

Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/libsoup/ChangeLog,v
retrieving revision 1.425
diff -u -r1.425 ChangeLog
--- ChangeLog	20 Apr 2004 14:22:36 -0000	1.425
+++ ChangeLog	4 May 2004 13:36:32 -0000
@@ -1,3 +1,8 @@
+2004-05-04  Sivaiah Nallagatla <snallagatla novell com>
+                                                                                                                             
+        * libsoup/soup-soap-message.c (finalize) : free
+        the elements of priv strcture before freeing priv
+
 2004-04-20  Dan Winship  <danw ximian com>
 
 	* libsoup/soup-connection-ntlm.c (ntlm_authorize_post): if
Index: libsoup/soup-soap-message.c
===================================================================
RCS file: /cvs/gnome/libsoup/libsoup/soup-soap-message.c,v
retrieving revision 1.8
diff -u -r1.8 soup-soap-message.c
--- libsoup/soup-soap-message.c	15 Mar 2004 21:50:53 -0000	1.8
+++ libsoup/soup-soap-message.c	4 May 2004 13:36:33 -0000
@@ -28,8 +28,28 @@
 finalize (GObject *object)
 {
 	SoupSoapMessage *msg = SOUP_SOAP_MESSAGE (object);
+	SoupSoapMessagePrivate *priv;
 
 	/* free memory */
+
+	priv = msg->priv;
+
+	if (priv->doc) 
+		xmlFreeDoc (priv->doc);
+	priv->doc = NULL;
+
+	if (priv->action)
+		g_free (priv->action);
+	priv->action = NULL;
+
+	 if (priv->env_uri)
+                g_free (priv->env_uri);
+	 priv->env_uri = NULL;
+
+	if (priv->env_prefix)
+                g_free (priv->env_prefix);
+        priv->env_prefix = NULL;
+
 	g_free (msg->priv);
 	msg->priv = NULL;
 


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