projects
/
platform
/
upstream
/
openconnect.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
50e9810
)
Check for alloc failure in cookie addition
author
David Woodhouse
<David.Woodhouse@intel.com>
Fri, 6 Nov 2009 11:16:22 +0000
(11:16 +0000)
committer
David Woodhouse
<David.Woodhouse@intel.com>
Fri, 6 Nov 2009 11:16:22 +0000
(11:16 +0000)
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
http.c
patch
|
blob
|
history
diff --git
a/http.c
b/http.c
index
1af5473
..
c96aa04
100644
(file)
--- a/
http.c
+++ b/
http.c
@@
-62,6
+62,12
@@
int http_add_cookie(struct openconnect_info *vpninfo, const char *option, const
new->next = NULL;
new->option = strdup(option);
new->value = strdup(value);
+ if (!new->option || !new->value) {
+ free(new->option);
+ free(new->value);
+ free(new);
+ return -ENOMEM;
+ }
} else {
/* Kill cookie; don't replace it */
new = NULL;