Fix memory leak 13/223613/1
authorJusung Son <jusung07.son@samsung.com>
Fri, 31 Jan 2020 07:15:47 +0000 (16:15 +0900)
committerJusung Son <jusung07.son@samsung.com>
Fri, 31 Jan 2020 07:15:47 +0000 (16:15 +0900)
Change-Id: Ic61ebe2896f4263b20f8c38c4448a519e9bffa2d
Signed-off-by: Jusung Son <jusung07.son@samsung.com>
lib/buxton2.c
vconf-compat/vconf.c

index 19edb6579ea04b475cfc302370ba907ccff23412..580050635de58e1009543b85438a976c343326a5 100644 (file)
@@ -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;
        }
index fd83b8a213301b170aae9e6f2b2f1e95cc5b0145..b9e40327514c582b40b2000b02495f03e6ace47f 100644 (file)
@@ -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;
        }