summaryrefslogtreecommitdiff
path: root/vpn
diff options
context:
space:
mode:
authorchleun.moon <chleun.moon@samsung.com>2017-05-04 06:23:33 (GMT)
committerchleun.moon <chleun.moon@samsung.com>2017-05-04 06:37:58 (GMT)
commit651d67b2c2cb5f51738cbdbc25409299e139c0f1 (patch)
tree75cb5fd5f1980aae175f26039fda2489544e286a /vpn
parent381b4d64dc20981d0019aa9c15692c3fa36e0292 (diff)
downloadconnman-651d67b2c2cb5f51738cbdbc25409299e139c0f1.zip
connman-651d67b2c2cb5f51738cbdbc25409299e139c0f1.tar.gz
connman-651d67b2c2cb5f51738cbdbc25409299e139c0f1.tar.bz2
Change-Id: I31373fbb6ad79517e63f4023c1f4bac2f63424e5 Signed-off-by: cheoleun <chleun.moon@samsung.com>
Diffstat (limited to 'vpn')
-rw-r--r--vpn/plugins/ipsec.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/vpn/plugins/ipsec.c b/vpn/plugins/ipsec.c
index e4bbf2b..cd8b625 100644
--- a/vpn/plugins/ipsec.c
+++ b/vpn/plugins/ipsec.c
@@ -722,7 +722,7 @@ static char *load_file_from_path(const char *path)
size_t file_size = 0;
char *file_buff = NULL;
- if (path) {
+ if (!path) {
connman_error("File path is NULL\n");
return NULL;
}
@@ -841,6 +841,7 @@ static int ipsec_load_cert(struct vpn_provider *provider)
DBG("CertType: %s, CertFalg: %s,CertData: %s", type, flag, data);
if (!type || ! flag || !data) {
connman_error("invalid certification information");
+ g_free(data);
return -EINVAL;
}
@@ -971,6 +972,9 @@ done:
if(err != 0 && cb)
cb(provider, data->user_data, -err);
+ if (data)
+ g_free(data);
+
return;
}