From c112d459c6c952e1c63941fb7a6ab38766cd4870 Mon Sep 17 00:00:00 2001 From: Syam Sidhardhan Date: Tue, 8 Jan 2013 17:07:46 +0530 Subject: [PATCH] health: Fix possible use after free A pointer to freed memory is dereferenced if we call function channel_acquire_continue() with out any earlier reference. --- profiles/health/hdp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/profiles/health/hdp.c b/profiles/health/hdp.c index 44448c438..c15f06af2 100644 --- a/profiles/health/hdp.c +++ b/profiles/health/hdp.c @@ -609,10 +609,10 @@ static DBusMessage *channel_acquire_continue(struct hdp_tmp_dc_data *data, data, hdp_tmp_dc_data_destroy, &gerr)) return NULL; - hdp_tmp_dc_data_unref(data); reply = g_dbus_create_error(data->msg, ERROR_INTERFACE ".HealthError", "Cannot reconnect: %s", gerr->message); g_error_free(gerr); + hdp_tmp_dc_data_unref(data); return reply; } -- 2.47.3