projects
/
project
/
uclient.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
uclient-http: Handle memory allocation failure
[project/uclient.git]
/
uclient-http.c
diff --git
a/uclient-http.c
b/uclient-http.c
index
20b8a9a
..
74cc9a9
100644
(file)
--- a/
uclient-http.c
+++ b/
uclient-http.c
@@
-946,6
+946,9
@@
static struct uclient *uclient_http_alloc(void)
struct uclient_http *uh;
uh = calloc_a(sizeof(*uh));
+ if (!uh)
+ return NULL;
+
uh->disconnect_t.cb = uclient_http_disconnect_cb;
blob_buf_init(&uh->headers, 0);