summaryrefslogtreecommitdiff
path: root/ext/sndfile
diff options
context:
space:
mode:
authorReynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>2015-11-17 15:23:17 -0800
committerReynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>2015-11-18 16:05:42 -0800
commit86ec81242987d876ef0760b6d9201c79de9d1bf4 (patch)
tree7218eb94926339718084cf101ab76907d8912793 /ext/sndfile
parent87b5ad0dfc2cca4c35337f85bc0f5b89fe462d6a (diff)
Remove unnecessary NULL checks before g_free()
g_free() is NULL-safe
Diffstat (limited to 'ext/sndfile')
-rw-r--r--ext/sndfile/gstsfsink.c3
-rw-r--r--ext/sndfile/gstsfsrc.c3
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;