diff options
author | diego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2010-11-07 12:47:40 +0000 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2010-11-08 18:05:12 +0200 |
commit | 12d3e0df9980822282f70dffad148b729dbee541 (patch) | |
tree | d298b2c8f5039eae7aeeb16dfd927bea0efcc134 /stream/tv.c | |
parent | af4b23cd36cff0dc34cde59c6a154fd080d11216 (diff) | |
download | mpv-12d3e0df9980822282f70dffad148b729dbee541.tar.bz2 mpv-12d3e0df9980822282f70dffad148b729dbee541.tar.xz |
cleanup: don't check for NULL before free()
patch by Clément Bœsch, ubitux gmail com
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32598 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'stream/tv.c')
-rw-r--r-- | stream/tv.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/stream/tv.c b/stream/tv.c index daa6b7dd7f..925109e778 100644 --- a/stream/tv.c +++ b/stream/tv.c @@ -107,13 +107,11 @@ tvi_handle_t *tv_new_handle(int size, const tvi_functions_t *functions) void tv_free_handle(tvi_handle_t *h) { - if (h) { - if (h->priv) - free(h->priv); - if (h->scan) - free(h->scan); - free(h); - } + if (!h) + return; + free(h->priv); + free(h->scan); + free(h); } void tv_start_scan(tvi_handle_t *tvh, int start) |