All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix: Free modem name in ofono_modem_remove
@ 2010-07-21  6:41 Zhenhua Zhang
  2010-07-21 16:59 ` Denis Kenzior
  0 siblings, 1 reply; 2+ messages in thread
From: Zhenhua Zhang @ 2010-07-21  6:41 UTC (permalink / raw)
  To: ofono

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

Avoid the memory leak of modem name.
---
 src/modem.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/modem.c b/src/modem.c
index ccbbc27..79a5d58 100644
--- a/src/modem.c
+++ b/src/modem.c
@@ -1495,6 +1495,7 @@ void ofono_modem_remove(struct ofono_modem *modem)
 	if (modem->driver_type)
 		g_free(modem->driver_type);
 
+	g_free(modem->name);
 	g_free(modem->path);
 	g_free(modem);
 }
-- 
1.7.0.4


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

* Re: [PATCH] Fix: Free modem name in ofono_modem_remove
  2010-07-21  6:41 [PATCH] Fix: Free modem name in ofono_modem_remove Zhenhua Zhang
@ 2010-07-21 16:59 ` Denis Kenzior
  0 siblings, 0 replies; 2+ messages in thread
From: Denis Kenzior @ 2010-07-21 16:59 UTC (permalink / raw)
  To: ofono

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

Hi Zhenhua,

On 07/21/2010 01:41 AM, Zhenhua Zhang wrote:
> Avoid the memory leak of modem name.
> ---
>  src/modem.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> @@ -1495,6 +1495,7 @@ void ofono_modem_remove(struct ofono_modem *modem)
>  	if (modem->driver_type)
>  		g_free(modem->driver_type);
>  
> +	g_free(modem->name);
>  	g_free(modem->path);
>  	g_free(modem);
>  }

Good catch.  Patch has been applied, thanks.

Regards,
-Denis

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

end of thread, other threads:[~2010-07-21 16:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-21  6:41 [PATCH] Fix: Free modem name in ofono_modem_remove Zhenhua Zhang
2010-07-21 16:59 ` Denis Kenzior

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.