All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] hso: Don't access freed data, in hso_set_online
@ 2012-02-27 20:04 Neil Jerram
  2012-02-27 23:17 ` Marcel Holtmann
  0 siblings, 1 reply; 5+ messages in thread
From: Neil Jerram @ 2012-02-27 20:04 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 539 bytes --]

---
 plugins/hso.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/plugins/hso.c b/plugins/hso.c
index 497c64e..249bb2c 100644
--- a/plugins/hso.c
+++ b/plugins/hso.c
@@ -421,9 +421,9 @@ static void hso_set_online(struct ofono_modem *modem, ofono_bool_t online,
 	if (g_at_chat_send(chat, command, NULL, set_online_cb, cbd, g_free))
 		return;
 
-	g_free(cbd);
-
 	CALLBACK_WITH_FAILURE(cb, cbd->data);
+
+	g_free(cbd);
 }
 
 static void hso_pre_sim(struct ofono_modem *modem)
-- 
1.7.9


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] hso: Don't access freed data, in hso_set_online
  2012-02-27 20:04 [PATCH] hso: Don't access freed data, in hso_set_online Neil Jerram
@ 2012-02-27 23:17 ` Marcel Holtmann
  0 siblings, 0 replies; 5+ messages in thread
From: Marcel Holtmann @ 2012-02-27 23:17 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 162 bytes --]

Hi Neil,

> ---
>  plugins/hso.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)

patch has been applied. Thanks.

Regards

Marcel



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] hso: Don't access freed data, in hso_set_online
  2012-02-27  2:07 ` Marcel Holtmann
@ 2012-02-27 19:59   ` Neil Jerram
  0 siblings, 0 replies; 5+ messages in thread
From: Neil Jerram @ 2012-02-27 19:59 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 667 bytes --]

Marcel Holtmann <marcel@holtmann.org> writes:

> Hi Neil,
>
>>  plugins/hso.c |    2 +-
>>  1 files changed, 1 insertions(+), 1 deletions(-)
>> 
>> diff --git a/plugins/hso.c b/plugins/hso.c
>> index 4834c56..697beaa 100644
>> --- a/plugins/hso.c
>> +++ b/plugins/hso.c
>> @@ -422,7 +422,7 @@ static void hso_set_online(struct ofono_modem *modem, ofono_bool_t online,
>>  
>>  	g_free(cbd);
>>  
>> -	CALLBACK_WITH_FAILURE(cb, cbd->data);
>> +	CALLBACK_WITH_FAILURE(cb, user_data);
>>  }
>
> just put the g_free last. See plugins/ifx.c for example. It seems I
> fixed most of the plugins, but forgot this one.

OK, will do, thanks.

    Neil

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] hso: Don't access freed data, in hso_set_online
  2012-02-26 17:43 Neil Jerram
@ 2012-02-27  2:07 ` Marcel Holtmann
  2012-02-27 19:59   ` Neil Jerram
  0 siblings, 1 reply; 5+ messages in thread
From: Marcel Holtmann @ 2012-02-27  2:07 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 585 bytes --]

Hi Neil,

>  plugins/hso.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/plugins/hso.c b/plugins/hso.c
> index 4834c56..697beaa 100644
> --- a/plugins/hso.c
> +++ b/plugins/hso.c
> @@ -422,7 +422,7 @@ static void hso_set_online(struct ofono_modem *modem, ofono_bool_t online,
>  
>  	g_free(cbd);
>  
> -	CALLBACK_WITH_FAILURE(cb, cbd->data);
> +	CALLBACK_WITH_FAILURE(cb, user_data);
>  }

just put the g_free last. See plugins/ifx.c for example. It seems I
fixed most of the plugins, but forgot this one.

Regards

Marcel



^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH] hso: Don't access freed data, in hso_set_online
@ 2012-02-26 17:43 Neil Jerram
  2012-02-27  2:07 ` Marcel Holtmann
  0 siblings, 1 reply; 5+ messages in thread
From: Neil Jerram @ 2012-02-26 17:43 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 475 bytes --]

---
 plugins/hso.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/plugins/hso.c b/plugins/hso.c
index 4834c56..697beaa 100644
--- a/plugins/hso.c
+++ b/plugins/hso.c
@@ -422,7 +422,7 @@ static void hso_set_online(struct ofono_modem *modem, ofono_bool_t online,
 
 	g_free(cbd);
 
-	CALLBACK_WITH_FAILURE(cb, cbd->data);
+	CALLBACK_WITH_FAILURE(cb, user_data);
 }
 
 static void hso_pre_sim(struct ofono_modem *modem)
-- 
1.7.9


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-02-27 23:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-27 20:04 [PATCH] hso: Don't access freed data, in hso_set_online Neil Jerram
2012-02-27 23:17 ` Marcel Holtmann
  -- strict thread matches above, loose matches on Subject: below --
2012-02-26 17:43 Neil Jerram
2012-02-27  2:07 ` Marcel Holtmann
2012-02-27 19:59   ` Neil Jerram

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.