[ekiga] Fixed small leak



commit 80bf6d361d9d88cdd1d2cb7bc616de5c1b7858fc
Author: Julien Puydt <jpuydt noether localdomain>
Date:   Sun Apr 19 10:12:18 2009 +0200

    Fixed small leak
---
 src/gui/assistant.cpp |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/src/gui/assistant.cpp b/src/gui/assistant.cpp
index 4243c1c..238609b 100644
--- a/src/gui/assistant.cpp
+++ b/src/gui/assistant.cpp
@@ -386,14 +386,17 @@ create_personal_data_page (EkigaAssistant *assistant)
 static void
 prepare_personal_data_page (EkigaAssistant *assistant)
 {
-  const gchar *full_name;
+  gchar* full_name = gm_conf_get_string (PERSONAL_DATA_KEY "full_name");
 
-  full_name = gm_conf_get_string (PERSONAL_DATA_KEY "full_name");
+  if (full_name == NULL || strlen (full_name) == 0) {
 
-  if (!full_name || strlen (full_name) == 0)
-    full_name = g_get_real_name ();
+    g_free (full_name);
+    full_name = g_strdup (g_get_real_name ());
+  }
 
   gtk_entry_set_text (GTK_ENTRY (assistant->priv->name), full_name);
+
+  g_free (full_name);
 }
 
 



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