power: fix memory leak 86/276586/1 accepted/tizen/unified/20220626.224822 submit/tizen/20220624.005127
authorYoungjae Cho <y0.cho@samsung.com>
Tue, 21 Jun 2022 09:17:02 +0000 (18:17 +0900)
committerYoungjae Cho <y0.cho@samsung.com>
Tue, 21 Jun 2022 09:17:02 +0000 (18:17 +0900)
Change-Id: Iafed41769cc4a1fa4d63ead83145f032820516c4
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
src/power-internal.c

index fe72dfc..58bde91 100644 (file)
@@ -288,6 +288,7 @@ int device_power_change_state(uint64_t state, int timeout_sec, change_state_call
        if (!connection) {
                _E("Failed to get dbus connection, %s", err->message);
                g_clear_error(&err);
+               free(h);
                return DEVICE_ERROR_OPERATION_FAILED;
        }