diff options
-rw-r--r-- | lib/buxton2.c | 1 | ||||
-rw-r--r-- | vconf-compat/vconf.c | 2 |
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; } |