Fix double free 51/314451/1
authorSukhyungKang <shine.kang@samsung.com>
Fri, 12 Jul 2024 01:33:06 +0000 (10:33 +0900)
committerSukhyungKang <shine.kang@samsung.com>
Fri, 12 Jul 2024 01:33:06 +0000 (10:33 +0900)
- if gvariant is floating and it's added to another gvariant using 'v'
option, the owner is moved. so gvariant should not be unref

Change-Id: I058c475045810cdc07d516e1b0502908357ea1ae
Signed-off-by: SukhyungKang <shine.kang@samsung.com>
src/notification_service.c

index 69dd63ffd2217c8144a91359454efbe4cc0243a2..5f5bd3bdd8e4e31fd5f7d0c109079829b41a22bb 100644 (file)
@@ -2456,7 +2456,6 @@ int notification_send_noti_event_by_priv_id(GVariant *parameters, GVariant **rep
 
                ret = send_event_notify_by_busname(coupled_body, "send_event", info->busname, PROVIDER_NOTI_EVENT_INTERFACE_NAME);
                g_variant_unref(coupled_body);
-               g_variant_unref(body);
 
                *reply_body = g_variant_new("()");
                if (*reply_body == NULL) {