From 97b2f0e9ce99a64e3d34461e939a2de72088dab0 Mon Sep 17 00:00:00 2001 From: Matt Ranostay Date: Tue, 30 Jul 2019 11:43:20 -0700 Subject: binding: bluetooth-map: unlink files after data transfers Bug-AGL: SPEC-2695 Change-Id: Iba2f3e4ecc033fb7d662b9998366350a880d9825 Signed-off-by: Matt Ranostay --- binding/bluetooth-map-api.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/binding/bluetooth-map-api.c b/binding/bluetooth-map-api.c index 40acb7f..7874181 100644 --- a/binding/bluetooth-map-api.c +++ b/binding/bluetooth-map-api.c @@ -24,6 +24,7 @@ #include #include +#include #include #include @@ -569,6 +570,8 @@ static void map_notification_event(struct map_state *ns, gchar *filename) if (jresp) afb_event_push(ns->notification_event, jresp); g_free(buf); + + g_unlink(filename); } static gboolean map_notification_check(GVariant *var) @@ -741,7 +744,9 @@ static void bluez_map_signal_callback( if (!g_strcmp0(status, "complete")) map_message_response(ns, (gchar *) val->value); + g_unlink(val->value); g_free(val->value); + g_free(val); break; } -- cgit 1.2.3-korg