[evolution-patches] Patch for leak in em-format-html.c
- From: Kjartan Maraas <kmaraas broadpark no>
- To: evolution-patches <evolution-patches gnome org>
- Subject: [evolution-patches] Patch for leak in em-format-html.c
- Date: Wed, 16 Aug 2006 15:48:56 +0200
Found by valgrind:
==24325== 814 bytes in 2 blocks are definitely lost in loss record 203 of 275
==24325== at 0x40053D0: malloc (vg_replace_malloc.c:149)
==24325== by 0x8815A2: g_try_malloc (gmem.c:196)
==24325== by 0x86CD7A: g_file_get_contents (gfileutils.c:638)
==24325== by 0x622A890: efh_url_requested (em-format-html.c:571)
==24325== by 0x4CB9DE6C: html_g_cclosure_marshal_VOID__STRING_POINTER (htmlmarshal.c:160)
==24325== by 0x915F0A: g_closure_invoke (gclosure.c:490)
==24325== by 0x926D72: signal_emit_unlocked_R (gsignal.c:2438)
==24325== by 0x92826E: g_signal_emit_valist (gsignal.c:2197)
==24325== by 0x928428: g_signal_emit (gsignal.c:2241)
==24325== by 0x4CB64BB2: html_engine_url_requested_cb (gtkhtml.c:469)
==24325== by 0x4CB9DE6C: html_g_cclosure_marshal_VOID__STRING_POINTER (htmlmarshal.c:160)
==24325== by 0x915F0A: g_closure_invoke (gclosure.c:490)
==24325== by 0x926D72: signal_emit_unlocked_R (gsignal.c:2438)
==24325== by 0x92826E: g_signal_emit_valist (gsignal.c:2197)
==24325== by 0x929CAD: g_signal_emit_by_name (gsignal.c:2265)
==24325== by 0x4CB9A390: html_image_factory_register (htmlimage.c:1454)
==24325== by 0x4CB9A875: html_image_init (htmlimage.c:866)
==24325== by 0x4CB9A96A: html_image_new (htmlimage.c:885)
==24325== by 0x4CB94194: element_parse_img (htmlengine.c:2603)
==24325== by 0x4CB8AD58: parse_one_token (htmlengine.c:3759)
==24325== by 0x4CB9125C: html_engine_timer_event (htmlengine.c:1356)
==24325== by 0x4CB91319: html_engine_flush (htmlengine.c:6495)
==24325== by 0x4CB5932F: gtk_html_flush (gtkhtml.c:5882)
==24325== by 0x623189B: emhs_sync_flush (em-html-stream.c:127)
==24325== by 0x6240CDC: emcs_gui_received (em-sync-stream.c:161)
==24325== by 0x8A37DC: g_io_unix_dispatch (giounix.c:162)
==24325== by 0x87A341: g_main_context_dispatch (gmain.c:2043)
==24325== by 0x87D31E: g_main_context_iterate (gmain.c:2675)
==24325== by 0x87D6C8: g_main_loop_run (gmain.c:2879)
==24325== by 0x4C616A22: bonobo_main (bonobo-main.c:311)
Cheers
Kjartan
Index: mail/em-format-html.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/em-format-html.c,v
retrieving revision 1.89
diff -u -p -r1.89 em-format-html.c
--- mail/em-format-html.c 13 Jun 2006 06:11:41 -0000 1.89
+++ mail/em-format-html.c 16 Aug 2006 13:47:33 -0000
@@ -573,6 +573,7 @@ efh_url_requested(GtkHTML *html, const c
gtk_html_stream_write (handle, data, length);
gtk_html_stream_close(handle, status? GTK_HTML_STREAM_OK : GTK_HTML_STREAM_ERROR);
+ g_free (data);
} else {
d(printf("HTML Includes reference to unknown uri '%s'\n", url));
gtk_html_stream_close(handle, GTK_HTML_STREAM_ERROR);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]