summaryrefslogtreecommitdiff
path: root/src/cairo-type1-subset.c
diff options
context:
space:
mode:
authorAndrea Canciani <ranma42@gmail.com>2011-07-30 11:04:16 +0200
committerAndrea Canciani <ranma42@gmail.com>2011-07-31 16:46:36 +0200
commite04e3687485a1988fd4084cca07ca4db4e2e7b96 (patch)
tree8fb5f5e81fa641f2b7e4bb7c4186151394b538fa /src/cairo-type1-subset.c
parent8f8da19fd47a51724e035a076628d38fde48863c (diff)
downloadcairo-e04e3687485a1988fd4084cca07ca4db4e2e7b96.tar.gz
Remove useless checks for NULL before freeing
This patch has been generated by the following Coccinelle semantic patch: // Remove useless checks for NULL before freeing // // free (NULL) is a no-op, so there is no need to avoid it @@ expression E; @@ + free (E); + E = NULL; - if (unlikely (E != NULL)) { - free(E); ( - E = NULL; | - E = 0; ) ... - } @@ expression E; @@ + free (E); - if (unlikely (E != NULL)) { - free (E); - }
Diffstat (limited to 'src/cairo-type1-subset.c')
-rw-r--r--src/cairo-type1-subset.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/cairo-type1-subset.c b/src/cairo-type1-subset.c
index 6c94a83f9..a637e24f3 100644
--- a/src/cairo-type1-subset.c
+++ b/src/cairo-type1-subset.c
@@ -1492,17 +1492,14 @@ _cairo_type1_font_subset_fini (cairo_type1_font_subset_t *font)
_cairo_array_fini (&font->glyph_names_array);
_cairo_array_fini (&font->glyphs_array);
- if (font->subrs)
- free (font->subrs);
+ free (font->subrs);
if (font->output != NULL)
status = _cairo_output_stream_destroy (font->output);
- if (font->base.base_font)
- free (font->base.base_font);
+ free (font->base.base_font);
- if (font->subset_index_to_glyphs)
- free (font->subset_index_to_glyphs);
+ free (font->subset_index_to_glyphs);
return status;
}