2014-01-22 10:48:57

by Andrei Emeltchenko

[permalink] [raw]
Subject: [PATCH] android/pan: Fix wrong freeing dev

From: Andrei Emeltchenko <[email protected]>

It does make sense free() dev after it is used. g_free() is not needed
here since it will be already executed in bt_pan_notify_conn_state().
---
android/pan.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/android/pan.c b/android/pan.c
index bfba128..4e04da0 100644
--- a/android/pan.c
+++ b/android/pan.c
@@ -463,7 +463,6 @@ static void nap_confirm_cb(GIOChannel *chan, gpointer data)
return;

failed:
- g_free(dev);
bt_pan_notify_conn_state(dev, HAL_PAN_STATE_DISCONNECTED);
}

--
1.8.3.2



2014-01-22 13:51:59

by Johan Hedberg

[permalink] [raw]
Subject: Re: [PATCH] android/pan: Fix wrong freeing dev

Hi Andrei,

On Wed, Jan 22, 2014, Andrei Emeltchenko wrote:
> It does make sense free() dev after it is used. g_free() is not needed
> here since it will be already executed in bt_pan_notify_conn_state().
> ---
> android/pan.c | 1 -
> 1 file changed, 1 deletion(-)

Applied. Thanks.

Johan