summaryrefslogtreecommitdiff
path: root/ext/curl
diff options
context:
space:
mode:
authorReynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>2017-07-26 16:51:50 -0700
committerReynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>2017-07-26 16:51:50 -0700
commitd82ae7a45f77837dae26e3d54189f2acd6dc235d (patch)
treedba1139e4bedd6ad8f03cd85452684e1b12c977f /ext/curl
parent85eb69d7179f8e349c7d8aa0713121cad2658a4d (diff)
downloadgstreamer-plugins-bad-d82ae7a45f77837dae26e3d54189f2acd6dc235d.tar.gz
curlhttpsrc: do not check for NULL before g_free()
g_free() is NULL-safe.
Diffstat (limited to 'ext/curl')
-rw-r--r--ext/curl/gstcurlhttpsrc.c28
1 files changed, 7 insertions, 21 deletions
diff --git a/ext/curl/gstcurlhttpsrc.c b/ext/curl/gstcurlhttpsrc.c
index 65fdfe4ba..d081dd02c 100644
--- a/ext/curl/gstcurlhttpsrc.c
+++ b/ext/curl/gstcurlhttpsrc.c
@@ -380,39 +380,27 @@ gst_curl_http_src_set_property (GObject * object, guint prop_id,
switch (prop_id) {
case PROP_URI:
- if (source->uri != NULL) {
- g_free (source->uri);
- }
+ g_free (source->uri);
source->uri = g_value_dup_string (value);
break;
case PROP_USERNAME:
- if (source->username != NULL) {
- g_free (source->username);
- }
+ g_free (source->username);
source->username = g_value_dup_string (value);
break;
case PROP_PASSWORD:
- if (source->password != NULL) {
- g_free (source->password);
- }
+ g_free (source->password);
source->password = g_value_dup_string (value);
break;
case PROP_PROXYURI:
- if (source->proxy_uri != NULL) {
- g_free (source->proxy_uri);
- }
+ g_free (source->proxy_uri);
source->proxy_uri = g_value_dup_string (value);
break;
case PROP_PROXYUSERNAME:
- if (source->proxy_user != NULL) {
- g_free (source->proxy_user);
- }
+ g_free (source->proxy_user);
source->proxy_user = g_value_dup_string (value);
break;
case PROP_PROXYPASSWORD:
- if (source->proxy_pass != NULL) {
- g_free (source->proxy_pass);
- }
+ g_free (source->proxy_pass);
source->proxy_pass = g_value_dup_string (value);
break;
case PROP_COOKIES:
@@ -421,9 +409,7 @@ gst_curl_http_src_set_property (GObject * object, guint prop_id,
source->number_cookies = g_strv_length (source->cookies);
break;
case PROP_USERAGENT:
- if (source->user_agent != NULL) {
- g_free (source->user_agent);
- }
+ g_free (source->user_agent);
source->user_agent = g_value_dup_string (value);
break;
case PROP_HEADERS: