projects
/
platform
/
upstream
/
connman.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1612cee
)
[CID-26975, 36747] Fix memory leak and dereference after null check
99/152899/2
author
chleun.moon
<chleun.moon@samsung.com>
Wed, 27 Sep 2017 10:22:29 +0000
(19:22 +0900)
committer
chleun.moon
<chleun.moon@samsung.com>
Wed, 27 Sep 2017 10:25:05 +0000
(19:25 +0900)
Change-Id: Ief1a868d989cb2cc78bb55980e3d8bee03a4a42b
Signed-off-by: Cheoleun Moon <chleun.moon@samsung.com>
vpn/plugins/ipsec.c
patch
|
blob
|
history
diff --git
a/vpn/plugins/ipsec.c
b/vpn/plugins/ipsec.c
index
7a2675e
..
fa9dc7a
100644
(file)
--- a/
vpn/plugins/ipsec.c
+++ b/
vpn/plugins/ipsec.c
@@
-714,7
+714,7
@@
static int ipsec_load_shared_psk(struct vpn_provider *provider)
if (!provider) {
connman_error("invalid provider");
- ret
=
-EINVAL;
+ ret
urn
-EINVAL;
}
data = vpn_provider_get_string(provider, "IPsec.IKEData");
@@
-840,8
+840,10
@@
static int ipsec_load_key(struct vpn_provider *provider)
return 0;
sect = vici_create_section(NULL);
- if (!sect)
+ if (!sect) {
+ g_free(data);
return -ENOMEM;
+ }
vici_add_kv(sect, "type", type, NULL);
vici_add_kv(sect, "data", data, NULL);