im.pidgin.pidgin: 2ed39e287c8bc0502ecaf3b390fc0441ab160a99
datallah at pidgin.im
datallah at pidgin.im
Fri Oct 5 15:31:43 EDT 2007
revision: 2ed39e287c8bc0502ecaf3b390fc0441ab160a99
date: 2007-10-05T19:23:55
author: datallah at pidgin.im
branch: im.pidgin.pidgin
changelog:
Fix a leak that occurs when getting the formatted buddy name under some conditions.
manifest:
format_version "1"
new_manifest [cbf594fc64c02651c89f62bd5cbc00950ba4bb46]
old_revision [61346ebfdbe38e90d131141a7fa41abeda7984c5]
patch "pidgin/gtkblist.c"
from [92ec3610a3ed5d37afdc7eb78846220c8c0c3e0d]
to [40e8e6f05a3160186da003a1f3a3594ac7a857b2]
-------------- next part --------------
============================================================
--- pidgin/gtkblist.c 92ec3610a3ed5d37afdc7eb78846220c8c0c3e0d
+++ pidgin/gtkblist.c 40e8e6f05a3160186da003a1f3a3594ac7a857b2
@@ -3663,25 +3663,31 @@ gchar *pidgin_blist_get_name_markup(Purp
else
idletime = g_strdup(_("Idle"));
- if (!selected)
+ if (!selected) {
+ g_free(text);
text = g_strdup_printf("<span color='%s'>%s</span>\n"
- "<span color='%s' size='smaller'>%s%s%s</span>",
- dim_grey(), esc, dim_grey(),
- idletime != NULL ? idletime : "",
- (idletime != NULL && statustext != NULL) ? " - " : "",
- statustext != NULL ? statustext : "");
+ "<span color='%s' size='smaller'>%s%s%s</span>",
+ dim_grey(), esc, dim_grey(),
+ idletime != NULL ? idletime : "",
+ (idletime != NULL && statustext != NULL) ? " - " : "",
+ statustext != NULL ? statustext : "");
+ }
}
- else if (!selected && !statustext) /* We handle selected text later */
+ else if (!selected && !statustext) {/* We handle selected text later */
+ g_free(text);
text = g_strdup_printf("<span color='%s'>%s</span>", dim_grey(), esc);
- else if (!selected && !text)
+ } else if (!selected && !text) {
+ g_free(text);
text = g_strdup_printf("<span color='%s'>%s</span>\n"
"<span color='%s' size='smaller'>%s</span>",
dim_grey(), esc, dim_grey(),
statustext != NULL ? statustext : "");
+ }
} else if (!PURPLE_BUDDY_IS_ONLINE(b)) {
- if (!selected && !statustext) /* We handle selected text later */
+ if (!selected && !statustext) {/* We handle selected text later */
+ g_free(text);
text = g_strdup_printf("<span color='%s'>%s</span>", dim_grey(), esc);
- else if (!selected && !text)
+ } else if (!selected && !text)
text = g_strdup_printf("<span color='%s'>%s</span>\n"
"<span color='%s' size='smaller'>%s</span>",
dim_grey(), esc, dim_grey(),
@@ -3698,13 +3704,15 @@ gchar *pidgin_blist_get_name_markup(Purp
}
/* It is selected. */
- if ((selected && !text) || (selected && idletime))
+ if ((selected && !text) || (selected && idletime)) {
+ g_free(text);
text = g_strdup_printf("%s\n"
"<span size='smaller'>%s%s%s</span>",
esc,
idletime != NULL ? idletime : "",
(idletime != NULL && statustext != NULL) ? " - " : "",
statustext != NULL ? statustext : "");
+ }
g_free(idletime);
g_free(statustext);
More information about the Commits
mailing list