diff options
author | Zhenhua Zhang <zhenhua.zhang@intel.com> | 2010-07-06 17:57:37 +0800 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2010-07-06 09:47:15 -0300 |
commit | b86b2d3299bf3c99d87cd852099e7ec18a1cfb7b (patch) | |
tree | 9634232e44e01f2bc5c708136d13797f3a5cfe5e | |
parent | 07b26d2deed80768e090919ab1f79ee93fe08d8c (diff) | |
download | ofono-b86b2d3299bf3c99d87cd852099e7ec18a1cfb7b.tar.bz2 |
gatppp: Check ppp instance before unref it
-rw-r--r-- | gatchat/gatppp.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gatchat/gatppp.c b/gatchat/gatppp.c index 1d41ded6..d9b16270 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) |