summaryrefslogtreecommitdiffstats
path: root/libass/ass_parse.c
diff options
context:
space:
mode:
authorGrigori Goronzy <greg@blackbox>2010-08-09 03:28:29 +0200
committerGrigori Goronzy <greg@blackbox>2010-08-09 05:58:00 +0200
commit32083be82b7b533fa85c36ae5ccacea94857fafa (patch)
treeb492d25d52fe7daed512d828aabccaa1eff4352d /libass/ass_parse.c
parent65d9960f24ec25cadfacd505046f9e4f2932bb12 (diff)
downloadlibass-32083be82b7b533fa85c36ae5ccacea94857fafa.tar.bz2
libass-32083be82b7b533fa85c36ae5ccacea94857fafa.tar.xz
Get rid of NULL checks for free
The useless "if (foo) free(foo)" idiom is all over the place, just get rid of it finally...
Diffstat (limited to 'libass/ass_parse.c')
-rw-r--r--libass/ass_parse.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libass/ass_parse.c b/libass/ass_parse.c
index cac5760..776416d 100644
--- a/libass/ass_parse.c
+++ b/libass/ass_parse.c
@@ -455,8 +455,7 @@ static char *parse_tag(ASS_Renderer *render_priv, char *p, double pwr)
family[p - start] = '\0';
} else
family = strdup(render_priv->state.style->FontName);
- if (render_priv->state.family)
- free(render_priv->state.family);
+ free(render_priv->state.family);
render_priv->state.family = family;
update_font(render_priv);
} else if (mystrcmp(&p, "alpha")) {