summaryrefslogtreecommitdiff
path: root/pango
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@gnome.org>2006-11-02 22:49:40 +0000
committerBehdad Esfahbod <behdad@src.gnome.org>2006-11-02 22:49:40 +0000
commit10b4737f9d0b0151414456eb1a063c242d592f12 (patch)
tree174cd0bc12a635efb76db69e52af844fe3929f39 /pango
parent244270f1f65375b7f95b142ad8ed863a3d7f2062 (diff)
downloadpango-10b4737f9d0b0151414456eb1a063c242d592f12.tar.gz
Bug 369670 – Checked g_free calls
2006-11-02 Behdad Esfahbod <behdad@gnome.org> Bug 369670 – Checked g_free calls * pango/pango-coverage.c (pango_coverage_unref): * pango/pango-layout.c (pango_layout_finalize), (pango_layout_set_text): * pango/pangofc-font.c (pango_fc_font_finalize): * pango/pangox-fontmap.c (pango_x_font_map_read_alias_file): Remove redundant checks before g_free() calls.
Diffstat (limited to 'pango')
-rw-r--r--pango/pango-coverage.c5
-rw-r--r--pango/pango-layout.c7
-rw-r--r--pango/pangofc-font.c3
-rw-r--r--pango/pangox-fontmap.c3
4 files changed, 6 insertions, 12 deletions
diff --git a/pango/pango-coverage.c b/pango/pango-coverage.c
index 360bfe3a..620e2b98 100644
--- a/pango/pango-coverage.c
+++ b/pango/pango-coverage.c
@@ -148,10 +148,7 @@ pango_coverage_unref (PangoCoverage *coverage)
if (coverage->ref_count == 0)
{
for (i=0; i<coverage->n_blocks; i++)
- {
- if (coverage->blocks[i].data)
- g_free (coverage->blocks[i].data);
- }
+ g_free (coverage->blocks[i].data);
g_free (coverage->blocks);
g_slice_free (PangoCoverage, coverage);
diff --git a/pango/pango-layout.c b/pango/pango-layout.c
index 2fdc95c5..323b1371 100644
--- a/pango/pango-layout.c
+++ b/pango/pango-layout.c
@@ -209,8 +209,8 @@ pango_layout_finalize (GObject *object)
if (layout->attrs)
pango_attr_list_unref (layout->attrs);
- if (layout->text)
- g_free (layout->text);
+
+ g_free (layout->text);
if (layout->font_desc)
pango_font_description_free (layout->font_desc);
@@ -889,8 +889,7 @@ pango_layout_set_text (PangoLayout *layout,
pango_layout_clear_lines (layout);
- if (old_text)
- g_free (old_text);
+ g_free (old_text);
}
/**
diff --git a/pango/pangofc-font.c b/pango/pangofc-font.c
index 5f62f428..1f15644e 100644
--- a/pango/pangofc-font.c
+++ b/pango/pangofc-font.c
@@ -152,8 +152,7 @@ pango_fc_font_finalize (GObject *object)
if (priv->decoder)
_pango_fc_font_set_decoder (fcfont, NULL);
- if (priv->char_to_glyph_cache)
- g_free (priv->char_to_glyph_cache);
+ g_free (priv->char_to_glyph_cache);
G_OBJECT_CLASS (pango_fc_font_parent_class)->finalize (object);
}
diff --git a/pango/pangox-fontmap.c b/pango/pangox-fontmap.c
index 4cbf06a8..f5d2437c 100644
--- a/pango/pangox-fontmap.c
+++ b/pango/pangox-fontmap.c
@@ -896,8 +896,7 @@ pango_x_font_map_read_alias_file (PangoXFontMap *xfontmap,
error:
if (xface)
{
- if (xface->xlfd)
- g_free (xface->xlfd);
+ g_free (xface->xlfd);
if (xface->description)
pango_font_description_free (xface->description);
g_free (xface);