projects
/
oweals
/
uclient.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a7bfe2f
)
core: fix memory leak if url change fails
author
Felix Fietkau
<nbd@openwrt.org>
Sat, 16 Jan 2016 19:13:36 +0000
(20:13 +0100)
committer
Felix Fietkau
<nbd@openwrt.org>
Sat, 16 Jan 2016 21:18:55 +0000
(22:18 +0100)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
uclient.c
patch
|
blob
|
history
diff --git
a/uclient.c
b/uclient.c
index 21f6f5dafdb5b1d3d6423de9819ba64060f0bb79..2113d8dc795c621c43ce9631a15d3a3151d691dc 100644
(file)
--- 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;