Mercurial > pidgin
comparison libpurple/protocols/myspace/myspace.c @ 24805:22fd7467f0cc
Fix a few small memleaks
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Thu, 18 Dec 2008 01:53:49 +0000 |
parents | 759dbafdc74a |
children | c6cadb7bdcf7 401f548e3544 4e8748f3374f |
comparison
equal
deleted
inserted
replaced
24804:29931785a68a | 24805:22fd7467f0cc |
---|---|
1378 } | 1378 } |
1379 | 1379 |
1380 if (status_headline && strcmp(status_headline, "") != 0) { | 1380 if (status_headline && strcmp(status_headline, "") != 0) { |
1381 /* The status headline is plaintext, but libpurple treats it as HTML, | 1381 /* The status headline is plaintext, but libpurple treats it as HTML, |
1382 * so escape any HTML characters to their entity equivalents. */ | 1382 * so escape any HTML characters to their entity equivalents. */ |
1383 status_headline_escaped = g_markup_escape_text(status_headline, strlen(status_headline)); | 1383 status_headline_escaped = g_markup_escape_text(status_headline, -1); |
1384 } else { | 1384 } else { |
1385 status_headline_escaped = NULL; | 1385 status_headline_escaped = NULL; |
1386 } | 1386 } |
1387 | 1387 |
1388 g_free(status_headline); | 1388 g_free(status_headline); |
1389 | 1389 |
1390 if (user->headline) | |
1391 g_free(user->headline); | |
1392 | |
1393 /* don't copy; let the MsimUser own the headline, memory-wise */ | 1390 /* don't copy; let the MsimUser own the headline, memory-wise */ |
1391 g_free(user->headline); | |
1394 user->headline = status_headline_escaped; | 1392 user->headline = status_headline_escaped; |
1395 | 1393 |
1396 /* Set user status */ | 1394 /* Set user status */ |
1397 switch (status_code) { | 1395 switch (status_code) { |
1398 case MSIM_STATUS_CODE_OFFLINE_OR_HIDDEN: | 1396 case MSIM_STATUS_CODE_OFFLINE_OR_HIDDEN: |
1419 | 1417 |
1420 unrecognized_msg = g_strdup_printf("msim_incoming_status, unrecognized status code: %d\n", | 1418 unrecognized_msg = g_strdup_printf("msim_incoming_status, unrecognized status code: %d\n", |
1421 status_code); | 1419 status_code); |
1422 msim_unrecognized(session, NULL, unrecognized_msg); | 1420 msim_unrecognized(session, NULL, unrecognized_msg); |
1423 g_free(unrecognized_msg); | 1421 g_free(unrecognized_msg); |
1424 | |
1425 } | 1422 } |
1426 | 1423 |
1427 purple_prpl_got_user_status(session->account, username, purple_primitive_get_id_from_type(purple_status_code), NULL); | 1424 purple_prpl_got_user_status(session->account, username, purple_primitive_get_id_from_type(purple_status_code), NULL); |
1428 | 1425 |
1429 if (status_code == MSIM_STATUS_CODE_IDLE) { | 1426 if (status_code == MSIM_STATUS_CODE_IDLE) { |