Fix memory leak 88/213088/1
authorJusung Son <jusung07.son@samsung.com>
Fri, 30 Aug 2019 07:12:32 +0000 (16:12 +0900)
committerJusung Son <jusung07.son@samsung.com>
Fri, 30 Aug 2019 07:13:04 +0000 (16:13 +0900)
Change-Id: I51edfeef16151d7dbc19c8c2fc9b5fdd8989eb24
Signed-off-by: Jusung Son <jusung07.son@samsung.com>
common/serialize.c

index 199e50c..d3152e2 100644 (file)
@@ -669,6 +669,7 @@ static int gv_to_req(GVariant *gv, struct request *req)
                if (v)
                        g_variant_unref(v);
                value_free(val);
+               free(val);
                bxt_err("Invalid parameter");
                return BUXTON_ERROR_INVALID_PARAMETER;
        }
@@ -679,6 +680,7 @@ static int gv_to_req(GVariant *gv, struct request *req)
 
        if (r != BUXTON_ERROR_NONE) {
                value_free(val);
+               free(val);
                return r;
        }