All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] gatserver: Don't free twice after user disconnect
@ 2010-07-05  2:59 Zhenhua Zhang
  2010-07-06 16:11 ` Denis Kenzior
  0 siblings, 1 reply; 2+ messages in thread
From: Zhenhua Zhang @ 2010-07-05  2:59 UTC (permalink / raw)
  To: ofono

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

It's possible to free gatserver in user disconnect function. So we
should not free it again.
---
 gatchat/gatserver.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/gatchat/gatserver.c b/gatchat/gatserver.c
index 3fa26a0..c63f04b 100644
--- a/gatchat/gatserver.c
+++ b/gatchat/gatserver.c
@@ -1019,9 +1019,6 @@ static void io_disconnect(gpointer user_data)
 
 	if (server->user_disconnect)
 		server->user_disconnect(server->user_disconnect_data);
-
-	if (server->destroyed)
-		g_free(server);
 }
 
 static void server_wakeup_writer(GAtServer *server)
-- 
1.6.3.3


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

* Re: [PATCH] gatserver: Don't free twice after user disconnect
  2010-07-05  2:59 [PATCH] gatserver: Don't free twice after user disconnect Zhenhua Zhang
@ 2010-07-06 16:11 ` Denis Kenzior
  0 siblings, 0 replies; 2+ messages in thread
From: Denis Kenzior @ 2010-07-06 16:11 UTC (permalink / raw)
  To: ofono

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

Hi Zhenhua,

> @@ -1019,9 +1019,6 @@ static void io_disconnect(gpointer user_data)
>  
>  	if (server->user_disconnect)
>  		server->user_disconnect(server->user_disconnect_data);
> -
> -	if (server->destroyed)
> -		g_free(server);
>  }
>  
>  static void server_wakeup_writer(GAtServer *server)

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-06 16:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-05  2:59 [PATCH] gatserver: Don't free twice after user disconnect Zhenhua Zhang
2010-07-06 16:11 ` 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.