diff options
author | Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com> | 2015-11-17 15:23:17 -0800 |
---|---|---|
committer | Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com> | 2015-11-18 16:05:42 -0800 |
commit | 86ec81242987d876ef0760b6d9201c79de9d1bf4 (patch) | |
tree | 7218eb94926339718084cf101ab76907d8912793 /ext/sndfile | |
parent | 87b5ad0dfc2cca4c35337f85bc0f5b89fe462d6a (diff) | |
download | gstreamer-plugins-bad-86ec81242987d876ef0760b6d9201c79de9d1bf4.tar.gz |
Remove unnecessary NULL checks before g_free()
g_free() is NULL-safe
Diffstat (limited to 'ext/sndfile')
-rw-r--r-- | ext/sndfile/gstsfsink.c | 3 | ||||
-rw-r--r-- | ext/sndfile/gstsfsrc.c | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/ext/sndfile/gstsfsink.c b/ext/sndfile/gstsfsink.c index c7f819499..5dc5e3af1 100644 --- a/ext/sndfile/gstsfsink.c +++ b/ext/sndfile/gstsfsink.c @@ -148,8 +148,7 @@ gst_sf_sink_set_location (GstSFSink * this, const gchar * location) if (this->file) goto was_open; - if (this->location) - g_free (this->location); + g_free (this->location); this->location = location ? g_strdup (location) : NULL; diff --git a/ext/sndfile/gstsfsrc.c b/ext/sndfile/gstsfsrc.c index d41953d2f..1090e68b9 100644 --- a/ext/sndfile/gstsfsrc.c +++ b/ext/sndfile/gstsfsrc.c @@ -146,8 +146,7 @@ gst_sf_src_set_location (GstSFSrc * this, const gchar * location) if (this->file) goto was_open; - if (this->location) - g_free (this->location); + g_free (this->location); this->location = location ? g_strdup (location) : NULL; |