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:
bda1490
)
Free CSTP option structure before error return if malloc fails
author
David Woodhouse
<David.Woodhouse@intel.com>
Wed, 26 Sep 2012 19:21:37 +0000
(20:21 +0100)
committer
David Woodhouse
<David.Woodhouse@intel.com>
Wed, 26 Sep 2012 19:21:37 +0000
(20:21 +0100)
Spotted by Coverity.
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
cstp.c
patch
|
blob
|
history
diff --git
a/cstp.c
b/cstp.c
index
284dcdf
..
dacb2ae
100644
(file)
--- a/
cstp.c
+++ b/
cstp.c
@@
-302,6
+302,9
@@
static int start_cstp_connection(struct openconnect_info *vpninfo)
if (!new_option->option || !new_option->value) {
vpn_progress(vpninfo, PRG_ERR, _("No memory for options\n"));
+ free(new_option->option);
+ free(new_option->value);
+ free(new_option);
return -ENOMEM;
}