# HG changeset patch # User Sadrul Habib Chowdhury # Date 1208451663 0 # Node ID 9fa57410e7439d6e324be710661e50b0c7dbafbb # Parent 0723826f922983bf6c14bd0816d606e5164b8101# Parent 6827600df4fc5a91d10acc80f1f5052e7f61bcb2 merge of '61d502ea8377846692aea9189056d7c134660277' and 'a6270c0093cc57b6059401e4023a0ae6e7d8627f' diff -r 0723826f9229 -r 9fa57410e743 pidgin/gtkimhtml.c --- a/pidgin/gtkimhtml.c Thu Apr 17 13:48:34 2008 +0000 +++ b/pidgin/gtkimhtml.c Thu Apr 17 17:01:03 2008 +0000 @@ -2697,8 +2697,11 @@ if (sml) font->sml = sml; - else if (oldfont && oldfont->sml) - font->sml = g_strdup(oldfont->sml); + else { + g_free(sml); + if (oldfont && oldfont->sml) + font->sml = g_strdup(oldfont->sml); + } if (size && !(options & GTK_IMHTML_NO_SIZES) && (imhtml->format_functions & (GTK_IMHTML_GROW|GTK_IMHTML_SHRINK))) { if (*size == '+') { @@ -2750,7 +2753,7 @@ case 46: /* IMG (opt) */ case 59: /* IMG */ { - const char *id; + char *id; gtk_text_buffer_insert(imhtml->text_buffer, iter, ws, wpos); ws[0] = '\0'; wpos = 0; @@ -2762,6 +2765,7 @@ if (!id) break; gtk_imhtml_insert_image_at_iter(imhtml, atoi(id), iter); + g_free(id); break; } case 47: /* P (opt) */