[evolution-patches] [gtkhtml] #61628 Memory leak in htmlengine-edit-text.c:set_link()
- From: Radek Doulík <rodo novell com>
- To: Patches <evolution-patches ximian com>
- Cc: Larry Ewing <lewing ximian com>
- Subject: [evolution-patches] [gtkhtml] #61628 Memory leak in htmlengine-edit-text.c:set_link()
- Date: Tue, 20 Jul 2004 14:09:11 +0200
fixes a memory leak and quiet compiler warnings
Index: htmlengine-edit-text.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/src/htmlengine-edit-text.c,v
retrieving revision 1.14
diff -u -p -r1.14 htmlengine-edit-text.c
--- htmlengine-edit-text.c 25 Jun 2004 15:59:12 -0000 1.14
+++ htmlengine-edit-text.c 20 Jul 2004 12:06:22 -0000
@@ -108,8 +108,8 @@ set_link (HTMLObject *obj, HTMLEngine *e
const char *complete_url = data;
if (html_object_is_text (obj) || HTML_IS_IMAGE (obj)) {
- char *url;
- char *target;
+ char *url = NULL;
+ char *target = NULL;
if (complete_url) {
url = g_strdup (complete_url);
@@ -136,6 +136,8 @@ set_link (HTMLObject *obj, HTMLEngine *e
html_object_remove_link (obj,
html_colorset_get_color (e->settings->color_set, HTMLTextColor));
}
+
+ g_free (url);
}
}
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gtkhtml/src/ChangeLog,v
retrieving revision 1.2024
diff -u -p -r1.2024 ChangeLog
--- ChangeLog 19 Jul 2004 13:40:37 -0000 1.2024
+++ ChangeLog 20 Jul 2004 12:06:29 -0000
@@ -1,4 +1,24 @@
+2004-07-20 Radek Doulik <rodo ximian com>
+
+ * htmlengine-edit-text.c (set_link): do not leak memory - free
+ url, init url, target to NULL to quiet compiler
+
2004-07-19 Radek Doulik <rodo ximian com>
+
+ * htmlframe.c (html_frame_real_calc_size): as below
+
+ * htmliframe.c (html_iframe_real_calc_size): do not queue size
+ request to avoid infinite loop
+
+ * htmlengine.c (html_engine_stream_end): queue resize after
+ content is loaded
+
+ * htmlembedded.c: set size of requisition to 0x0 before calling
+ size request
+
+ * gtkhtml.c: handle size request, do own size allocate for
+ children widgets. move construct call from _new methods to init so
+ that it's easy to derive widget from us
* htmltext.c (save_open_attrs): save <TT>
(save_close_attrs): save </TT>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]