[empathy/mc5] Fix a small memory leak



commit 3245c197d95c326372323addde9f62ca96167a33
Author: Sjoerd Simons <sjoerd simons collabora co uk>
Date:   Fri Aug 21 18:51:24 2009 +0100

    Fix a small memory leak

 src/empathy-import-pidgin.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/src/empathy-import-pidgin.c b/src/empathy-import-pidgin.c
index 5c8221c..6a145ff 100644
--- a/src/empathy-import-pidgin.c
+++ b/src/empathy-import-pidgin.c
@@ -209,12 +209,12 @@ empathy_import_pidgin_load (void)
               if (g_str_has_prefix (protocol, "prpl-"))
                 protocol += 5;
 
-              data->protocol = g_strdup (protocol);
-
-              if (!tp_strdiff (data->protocol, PIDGIN_PROTOCOL_BONJOUR))
-                data->protocol = "salut";
-              else if (!tp_strdiff (data->protocol, PIDGIN_PROTOCOL_NOVELL))
-                data->protocol = "groupwise";
+              if (!tp_strdiff (protocol, PIDGIN_PROTOCOL_BONJOUR))
+                data->protocol = g_strdup ("salut");
+              else if (!tp_strdiff (protocol, PIDGIN_PROTOCOL_NOVELL))
+                data->protocol = g_strdup ("groupwise");
+              else
+                data->protocol = g_strdup (protocol);
 
               xmlFree (content);
 



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