summaryrefslogtreecommitdiff
path: root/uclient.c
diff options
context:
space:
mode:
Diffstat (limited to 'uclient.c')
-rw-r--r--uclient.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/uclient.c b/uclient.c
index 21f6f5d..2113d8d 100644
--- a/uclient.c
+++ b/uclient.c
@@ -182,8 +182,10 @@ int uclient_set_url(struct uclient *cl, const char *url_str, const char *auth_st
if (!url)
return -1;
- if (url->backend != cl->backend)
+ if (url->backend != cl->backend) {
+ free(url);
return -1;
+ }
free(cl->url);
cl->url = url;