summaryrefslogtreecommitdiff
path: root/src/trg-client.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/trg-client.c')
-rw-r--r--src/trg-client.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/trg-client.c b/src/trg-client.c
index 6f33b36..8ab2afd 100644
--- a/src/trg-client.c
+++ b/src/trg-client.c
@@ -442,11 +442,15 @@ void trg_client_configunlock(TrgClient * tc)
void trg_response_free(trg_response * response)
{
- if (response->obj)
- json_object_unref(response->obj);
- if (response->raw)
- g_free(response->raw);
- g_free(response);
+ if (response) {
+ if (response->obj)
+ json_object_unref(response->obj);
+
+ if (response->raw)
+ g_free(response->raw);
+
+ g_free(response);
+ }
}
static size_t
@@ -559,10 +563,6 @@ static CURL* get_curl(TrgClient *tc, guint http_class)
priv->http_class = http_class;
}
- if (http_class == HTTP_CLASS_TRANSMISSION) {
- curl_easy_setopt(curl, CURLOPT_URL, trg_client_get_url(tc));
- }
-
curl_easy_setopt(curl, CURLOPT_TIMEOUT,
(long) trg_prefs_get_int(prefs, TRG_PREFS_KEY_TIMEOUT,
TRG_PREFS_CONNECTION));