]> git.0d.be Git - empathy.git/commitdiff
Fix a small memory leak
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>
Fri, 21 Aug 2009 17:51:24 +0000 (18:51 +0100)
committerSjoerd Simons <sjoerd.simons@collabora.co.uk>
Fri, 21 Aug 2009 17:51:24 +0000 (18:51 +0100)
src/empathy-import-pidgin.c

index 5c8221ce77cd7ca897e5c1e29cde4c2cc6e8aa0e..6a145ff933bb489f2c62e17c93c9c166aaba150f 100644 (file)
@@ -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);