summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJusung Son <jusung07.son@samsung.com>2020-01-31 16:15:47 +0900
committerJusung Son <jusung07.son@samsung.com>2020-01-31 16:15:47 +0900
commit5c8d1109e2fdf623a622c5af8fc49d9e501707d1 (patch)
tree4a9f8ce9800b7954369e558e4c8a5badbcbe2261
parentf43f802acb2e73dcea3de2df36c1026baedb5028 (diff)
downloadbuxton2-5c8d1109e2fdf623a622c5af8fc49d9e501707d1.tar.gz
buxton2-5c8d1109e2fdf623a622c5af8fc49d9e501707d1.tar.bz2
buxton2-5c8d1109e2fdf623a622c5af8fc49d9e501707d1.zip
Fix memory leak
Change-Id: Ic61ebe2896f4263b20f8c38c4448a519e9bffa2d Signed-off-by: Jusung Son <jusung07.son@samsung.com>
-rw-r--r--lib/buxton2.c1
-rw-r--r--vconf-compat/vconf.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/lib/buxton2.c b/lib/buxton2.c
index 19edb65..5800506 100644
--- a/lib/buxton2.c
+++ b/lib/buxton2.c
@@ -167,6 +167,7 @@ EXPORT struct buxton_value *buxton_value_create_string(const char *s)
ret = value_create(BUXTON_TYPE_STRING, &str, &v);
if (ret != BUXTON_ERROR_NONE) {
+ free(str);
buxton_err_set_errno(ret);
return NULL;
}
diff --git a/vconf-compat/vconf.c b/vconf-compat/vconf.c
index fd83b8a..b9e4032 100644
--- a/vconf-compat/vconf.c
+++ b/vconf-compat/vconf.c
@@ -1434,7 +1434,7 @@ static struct _keynode_t *_vconf_alloc_keynode(const char *keyname)
r = _vconf_set_keynode_value(v, keynode);
if (r != 0) {
- free(keynode);
+ _vconf_free_keynode(keynode);
buxton_value_free(v);
return NULL;
}