summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>2000-05-09 04:30:49 +0000
committerOwen Taylor <otaylor@src.gnome.org>2000-05-09 04:30:49 +0000
commit91b20d0e1ac51e5502f58f0e561791ab6c7f356e (patch)
tree92b879e242a032f8ab4ef36e555731956d5848eb
parentf8f1c0229fb4444706d863ef9c588df96460a3a4 (diff)
downloadpango-91b20d0e1ac51e5502f58f0e561791ab6c7f356e.tar.gz
Fix memory leak by freeing correct list.
Tue May 9 03:22:11 2000 Owen Taylor <otaylor@redhat.com> * 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?)
-rw-r--r--ChangeLog11
-rw-r--r--ChangeLog.pre-1-011
-rw-r--r--ChangeLog.pre-1-1011
-rw-r--r--ChangeLog.pre-1-211
-rw-r--r--ChangeLog.pre-1-411
-rw-r--r--ChangeLog.pre-1-611
-rw-r--r--ChangeLog.pre-1-811
-rw-r--r--pango/pango-context.c6
-rw-r--r--pango/pango-layout.c2
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 <otaylor@redhat.com>
+
+ * 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 <otaylor@redhat.com>
* 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 <otaylor@redhat.com>
+
+ * 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 <otaylor@redhat.com>
* 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 <otaylor@redhat.com>
+
+ * 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 <otaylor@redhat.com>
* 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 <otaylor@redhat.com>
+
+ * 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 <otaylor@redhat.com>
* 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 <otaylor@redhat.com>
+
+ * 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 <otaylor@redhat.com>
* 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 <otaylor@redhat.com>
+
+ * 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 <otaylor@redhat.com>
* 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 <otaylor@redhat.com>
+
+ * 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 <otaylor@redhat.com>
* 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)
{