Mercurial > pidgin.yaz
comparison libpurple/protocols/myspace/user.c @ 24770:22fd7467f0cc
Fix a few small memleaks
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Thu, 18 Dec 2008 01:53:49 +0000 |
parents | c044eb54b7ac |
children | a9b4599a5367 401f548e3544 4e8748f3374f |
comparison
equal
deleted
inserted
replaced
24769:29931785a68a | 24770:22fd7467f0cc |
---|---|
284 msim_store_user_info_each(const gchar *key_str, gchar *value_str, MsimUser *user) | 284 msim_store_user_info_each(const gchar *key_str, gchar *value_str, MsimUser *user) |
285 { | 285 { |
286 if (g_str_equal(key_str, "UserID") || g_str_equal(key_str, "ContactID")) { | 286 if (g_str_equal(key_str, "UserID") || g_str_equal(key_str, "ContactID")) { |
287 /* Save to buddy list, if it exists, for quick cached uid lookup with msim_uid2username_from_blist(). */ | 287 /* Save to buddy list, if it exists, for quick cached uid lookup with msim_uid2username_from_blist(). */ |
288 user->id = atol(value_str); | 288 user->id = atol(value_str); |
289 g_free(value_str); | |
289 if (user->buddy) | 290 if (user->buddy) |
290 { | 291 { |
291 purple_debug_info("msim", "associating uid %s with username %s\n", key_str, user->buddy->name); | 292 purple_debug_info("msim", "associating uid %s with username %s\n", key_str, user->buddy->name); |
292 purple_blist_node_set_int(&user->buddy->node, "UserID", user->id); | 293 purple_blist_node_set_int(&user->buddy->node, "UserID", user->id); |
293 } | 294 } |
301 } else if (g_str_equal(key_str, "Location")) { | 302 } else if (g_str_equal(key_str, "Location")) { |
302 g_free(user->location); | 303 g_free(user->location); |
303 user->location = value_str; | 304 user->location = value_str; |
304 } else if (g_str_equal(key_str, "TotalFriends")) { | 305 } else if (g_str_equal(key_str, "TotalFriends")) { |
305 user->total_friends = atol(value_str); | 306 user->total_friends = atol(value_str); |
307 g_free(value_str); | |
306 } else if (g_str_equal(key_str, "DisplayName")) { | 308 } else if (g_str_equal(key_str, "DisplayName")) { |
307 g_free(user->display_name); | 309 g_free(user->display_name); |
308 user->display_name = value_str; | 310 user->display_name = value_str; |
309 } else if (g_str_equal(key_str, "BandName")) { | 311 } else if (g_str_equal(key_str, "BandName")) { |
310 msim_set_artist_or_title(user, value_str, NULL); | 312 msim_set_artist_or_title(user, value_str, NULL); |
313 g_free(value_str); | |
311 } else if (g_str_equal(key_str, "SongName")) { | 314 } else if (g_str_equal(key_str, "SongName")) { |
312 msim_set_artist_or_title(user, NULL, value_str); | 315 msim_set_artist_or_title(user, NULL, value_str); |
316 g_free(value_str); | |
313 } else if (g_str_equal(key_str, "UserName") || g_str_equal(key_str, "IMName") || g_str_equal(key_str, "NickName")) { | 317 } else if (g_str_equal(key_str, "UserName") || g_str_equal(key_str, "IMName") || g_str_equal(key_str, "NickName")) { |
314 /* Ignore because PurpleBuddy knows this already */ | 318 /* Ignore because PurpleBuddy knows this already */ |
315 g_free(value_str); | 319 g_free(value_str); |
316 } else if (g_str_equal(key_str, "ImageURL") || g_str_equal(key_str, "AvatarURL")) { | 320 } else if (g_str_equal(key_str, "ImageURL") || g_str_equal(key_str, "AvatarURL")) { |
317 const gchar *previous_url; | 321 const gchar *previous_url; |