aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2012-11-25 18:39:11 +0000
committerWilmer van der Gaast <wilmer@gaast.net>2012-11-25 18:39:11 +0000
commit9ed00818d7351ca5bcb4ba16b5dfe900d45831d5 (patch)
tree1aa0a3e2656c78a5543d5c44adfd7835ca67e9d2
parent29f72b7a4b4fa960b6fccb45243fa3f5d87a99bf (diff)
Fixed one potential memory leak, and re-remembered that for GLib + valgrind
you REALLY need to set G_SLICE=always-malloc. Argh!
-rw-r--r--nick.c4
-rw-r--r--protocols/twitter/twitter_lib.c1
2 files changed, 4 insertions, 1 deletions
diff --git a/nick.c b/nick.c
index 0d394ecb..4b7e71d0 100644
--- a/nick.c
+++ b/nick.c
@@ -133,7 +133,10 @@ char *nick_gen( bee_user_t *bu )
{
chop = fmt[1];
if( chop == '\0' )
+ {
+ g_string_free( ret, TRUE );
return NULL;
+ }
fmt += 2;
}
else if( isdigit( *fmt ) )
@@ -186,6 +189,7 @@ char *nick_gen( bee_user_t *bu )
}
else
{
+ g_string_free( ret, TRUE );
return NULL;
}
}
diff --git a/protocols/twitter/twitter_lib.c b/protocols/twitter/twitter_lib.c
index b888a730..fe276133 100644
--- a/protocols/twitter/twitter_lib.c
+++ b/protocols/twitter/twitter_lib.c
@@ -270,7 +270,6 @@ static gboolean twitter_xt_get_friends_id_list(json_value *node, struct twitter_
txl->list = g_slist_prepend(txl->list,
g_strdup_printf("%lld", c->u.array.values[i]->u.integer));
-
}
c = json_o_get(node, "next_cursor");