From 771f87452f998df08219987c414ea41243ba51e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tadeusz=20So=C5=9Bnierz?= Date: Sun, 27 Jun 2010 22:18:50 +0000 Subject: [PATCH] Fixed a memleak introduced in the last commit --- src/ui_roster.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/ui_roster.c b/src/ui_roster.c index aadda0e..bfe5cd0 100644 --- a/src/ui_roster.c +++ b/src/ui_roster.c @@ -288,8 +288,12 @@ ui_roster_add(const gchar *j, const gchar *n, const gchar *g) UiGroup *group; GSList *elem; /* checking if our buddy belongs to some group */ - if (g == NULL) - g = g_strdup("general"); + if (g == NULL) { + /* that looks a bit ugly, yet saves us some dynamic + * memory allocation crap */ + char buf[] = "general"; + g = buf; + } /* looking for his group */ for(elem = groups; elem; elem = elem->next) { group = (UiGroup *)elem->data;