From 91b20d0e1ac51e5502f58f0e561791ab6c7f356e Mon Sep 17 00:00:00 2001 From: Owen Taylor Date: Tue, 9 May 2000 04:30:49 +0000 Subject: Fix memory leak by freeing correct list. Tue May 9 03:22:11 2000 Owen Taylor * pango/pango-layout.c (pango_layout_check_lines): Fix memory leak by freeing correct list. * pango/pango-context.c (pango_context_get_font_description): Change to return a pointer to the context's font description instead of a copy. Not quite 100% kosher but a lot more efficient than the previous. (Should we just refcount font descriptions and get it over with?) --- ChangeLog | 11 +++++++++++ ChangeLog.pre-1-0 | 11 +++++++++++ ChangeLog.pre-1-10 | 11 +++++++++++ ChangeLog.pre-1-2 | 11 +++++++++++ ChangeLog.pre-1-4 | 11 +++++++++++ ChangeLog.pre-1-6 | 11 +++++++++++ ChangeLog.pre-1-8 | 11 +++++++++++ pango/pango-context.c | 6 +++--- pango/pango-layout.c | 2 +- 9 files changed, 81 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7c6b4d7d..2e094388 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +Tue May 9 03:22:11 2000 Owen Taylor + + * pango/pango-layout.c (pango_layout_check_lines): Fix + memory leak by freeing correct list. + + * pango/pango-context.c (pango_context_get_font_description): + Change to return a pointer to the context's font description + instead of a copy. Not quite 100% kosher but a lot + more efficient than the previous. (Should we just refcount + font descriptions and get it over with?) + Mon May 8 16:39:48 2000 Owen Taylor * pango/pango-layout.c (free_run): Call pango_item_free diff --git a/ChangeLog.pre-1-0 b/ChangeLog.pre-1-0 index 7c6b4d7d..2e094388 100644 --- a/ChangeLog.pre-1-0 +++ b/ChangeLog.pre-1-0 @@ -1,3 +1,14 @@ +Tue May 9 03:22:11 2000 Owen Taylor + + * pango/pango-layout.c (pango_layout_check_lines): Fix + memory leak by freeing correct list. + + * pango/pango-context.c (pango_context_get_font_description): + Change to return a pointer to the context's font description + instead of a copy. Not quite 100% kosher but a lot + more efficient than the previous. (Should we just refcount + font descriptions and get it over with?) + Mon May 8 16:39:48 2000 Owen Taylor * pango/pango-layout.c (free_run): Call pango_item_free diff --git a/ChangeLog.pre-1-10 b/ChangeLog.pre-1-10 index 7c6b4d7d..2e094388 100644 --- a/ChangeLog.pre-1-10 +++ b/ChangeLog.pre-1-10 @@ -1,3 +1,14 @@ +Tue May 9 03:22:11 2000 Owen Taylor + + * pango/pango-layout.c (pango_layout_check_lines): Fix + memory leak by freeing correct list. + + * pango/pango-context.c (pango_context_get_font_description): + Change to return a pointer to the context's font description + instead of a copy. Not quite 100% kosher but a lot + more efficient than the previous. (Should we just refcount + font descriptions and get it over with?) + Mon May 8 16:39:48 2000 Owen Taylor * pango/pango-layout.c (free_run): Call pango_item_free diff --git a/ChangeLog.pre-1-2 b/ChangeLog.pre-1-2 index 7c6b4d7d..2e094388 100644 --- a/ChangeLog.pre-1-2 +++ b/ChangeLog.pre-1-2 @@ -1,3 +1,14 @@ +Tue May 9 03:22:11 2000 Owen Taylor + + * pango/pango-layout.c (pango_layout_check_lines): Fix + memory leak by freeing correct list. + + * pango/pango-context.c (pango_context_get_font_description): + Change to return a pointer to the context's font description + instead of a copy. Not quite 100% kosher but a lot + more efficient than the previous. (Should we just refcount + font descriptions and get it over with?) + Mon May 8 16:39:48 2000 Owen Taylor * pango/pango-layout.c (free_run): Call pango_item_free diff --git a/ChangeLog.pre-1-4 b/ChangeLog.pre-1-4 index 7c6b4d7d..2e094388 100644 --- a/ChangeLog.pre-1-4 +++ b/ChangeLog.pre-1-4 @@ -1,3 +1,14 @@ +Tue May 9 03:22:11 2000 Owen Taylor + + * pango/pango-layout.c (pango_layout_check_lines): Fix + memory leak by freeing correct list. + + * pango/pango-context.c (pango_context_get_font_description): + Change to return a pointer to the context's font description + instead of a copy. Not quite 100% kosher but a lot + more efficient than the previous. (Should we just refcount + font descriptions and get it over with?) + Mon May 8 16:39:48 2000 Owen Taylor * pango/pango-layout.c (free_run): Call pango_item_free diff --git a/ChangeLog.pre-1-6 b/ChangeLog.pre-1-6 index 7c6b4d7d..2e094388 100644 --- a/ChangeLog.pre-1-6 +++ b/ChangeLog.pre-1-6 @@ -1,3 +1,14 @@ +Tue May 9 03:22:11 2000 Owen Taylor + + * pango/pango-layout.c (pango_layout_check_lines): Fix + memory leak by freeing correct list. + + * pango/pango-context.c (pango_context_get_font_description): + Change to return a pointer to the context's font description + instead of a copy. Not quite 100% kosher but a lot + more efficient than the previous. (Should we just refcount + font descriptions and get it over with?) + Mon May 8 16:39:48 2000 Owen Taylor * pango/pango-layout.c (free_run): Call pango_item_free diff --git a/ChangeLog.pre-1-8 b/ChangeLog.pre-1-8 index 7c6b4d7d..2e094388 100644 --- a/ChangeLog.pre-1-8 +++ b/ChangeLog.pre-1-8 @@ -1,3 +1,14 @@ +Tue May 9 03:22:11 2000 Owen Taylor + + * pango/pango-layout.c (pango_layout_check_lines): Fix + memory leak by freeing correct list. + + * pango/pango-context.c (pango_context_get_font_description): + Change to return a pointer to the context's font description + instead of a copy. Not quite 100% kosher but a lot + more efficient than the previous. (Should we just refcount + font descriptions and get it over with?) + Mon May 8 16:39:48 2000 Owen Taylor * pango/pango-layout.c (free_run): Call pango_item_free diff --git a/pango/pango-context.c b/pango/pango-context.c index a0134eb4..9b1db987 100644 --- a/pango/pango-context.c +++ b/pango/pango-context.c @@ -377,15 +377,15 @@ pango_context_set_font_description (PangoContext *context, * * Retrieve the default font description for the context. * - * Return value: a newly allocated copy of the contexts default font description. - * This value must be free with pango_font_description_free() + * Return value: a pointer to the context's default font description. + * This value must not be modified or freed. **/ PangoFontDescription * pango_context_get_font_description (PangoContext *context) { g_return_val_if_fail (context != NULL, NULL); - return pango_font_description_copy (context->font_desc); + return context->font_desc; } /** diff --git a/pango/pango-layout.c b/pango/pango-layout.c index 4bf1c45c..4e695581 100644 --- a/pango/pango-layout.c +++ b/pango/pango-layout.c @@ -1738,7 +1738,7 @@ pango_layout_check_lines (PangoLayout *layout) layout->lines = g_slist_prepend (layout->lines, line); - g_list_free (tmp_list); + g_list_free (items); if (!done) { -- cgit v1.2.1