All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] gatppp: Check ppp instance before unref it
@ 2010-07-06  9:57 Zhenhua Zhang
  2010-07-06  9:57 ` [PATCH 2/2] gathdlc: Unset disconnect function in unref Zhenhua Zhang
  2010-07-06 12:48 ` [PATCH 1/2] gatppp: Check ppp instance before unref it Marcel Holtmann
  0 siblings, 2 replies; 7+ messages in thread
From: Zhenhua Zhang @ 2010-07-06  9:57 UTC (permalink / raw)
  To: ofono

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

---
 gatchat/gatppp.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/gatchat/gatppp.c b/gatchat/gatppp.c
index 1d41ded..d9b1627 100644
--- a/gatchat/gatppp.c
+++ b/gatchat/gatppp.c
@@ -446,6 +446,9 @@ void g_at_ppp_unref(GAtPPP *ppp)
 {
 	gboolean is_zero;
 
+	if (ppp == NULL)
+		return;
+
 	is_zero = g_atomic_int_dec_and_test(&ppp->ref_count);
 
 	if (is_zero == FALSE)
-- 
1.6.3.3


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

end of thread, other threads:[~2010-07-07  1:32 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-06  9:57 [PATCH 1/2] gatppp: Check ppp instance before unref it Zhenhua Zhang
2010-07-06  9:57 ` [PATCH 2/2] gathdlc: Unset disconnect function in unref Zhenhua Zhang
2010-07-06 10:03   ` Zhang, Zhenhua
2010-07-06 16:45     ` Denis Kenzior
2010-07-06 16:28   ` Denis Kenzior
2010-07-07  1:32     ` Zhang, Zhenhua
2010-07-06 12:48 ` [PATCH 1/2] gatppp: Check ppp instance before unref it Marcel Holtmann

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.