Fix memory leak 96/237196/1
authorSeonah Moon <seonah1.moon@samsung.com>
Fri, 26 Jun 2020 02:21:54 +0000 (11:21 +0900)
committerSeonah Moon <seonah1.moon@samsung.com>
Fri, 26 Jun 2020 02:21:59 +0000 (11:21 +0900)
Change-Id: I0394acc1910244fc961f49b60361d79b32f961be

src/asp-manager-gdbus.c

index 0f7c3d8..f177a2f 100755 (executable)
@@ -535,6 +535,8 @@ static gboolean __asp_manager_gdbus_connect_session(AspSession *object,
                        if (session_info == NULL) {
                                ASP_LOGE("Memory Failure");
                                ASP_RETURN_SESSION_ERR(invocation, -ASP_ERROR_MEMORY);
+                               g_free(key);
+                               g_variant_unref(var);
                                goto out;
                        }
                        memcpy(session_info, str, info_length);