[PATCH 1/2] gatppp: Check ppp instance before unref it
Zhenhua Zhang
zhenhua.zhang at intel.com
Tue Jul 6 02:57:37 PDT 2010
---
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
More information about the ofono
mailing list