diff options
author | Grigori Goronzy <greg@blackbox> | 2010-08-09 03:28:29 +0200 |
---|---|---|
committer | Grigori Goronzy <greg@blackbox> | 2010-08-09 05:58:00 +0200 |
commit | 32083be82b7b533fa85c36ae5ccacea94857fafa (patch) | |
tree | b492d25d52fe7daed512d828aabccaa1eff4352d /libass/ass_library.c | |
parent | 65d9960f24ec25cadfacd505046f9e4f2932bb12 (diff) | |
download | libass-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_library.c')
-rw-r--r-- | libass/ass_library.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/libass/ass_library.c b/libass/ass_library.c index eef1aa2..13b5dab 100644 --- a/libass/ass_library.c +++ b/libass/ass_library.c @@ -59,8 +59,7 @@ void ass_library_done(ASS_Library *priv) void ass_set_fonts_dir(ASS_Library *priv, const char *fonts_dir) { - if (priv->fonts_dir) - free(priv->fonts_dir); + free(priv->fonts_dir); priv->fonts_dir = fonts_dir ? strdup(fonts_dir) : 0; } @@ -79,8 +78,8 @@ void ass_set_style_overrides(ASS_Library *priv, char **list) if (priv->style_overrides) { for (p = priv->style_overrides; *p; ++p) free(*p); - free(priv->style_overrides); } + free(priv->style_overrides); if (!list) return; |