gatppp: Check ppp instance before unref it

This commit is contained in:
Zhenhua Zhang 2010-07-06 17:57:37 +08:00 committed by Marcel Holtmann
parent 07b26d2dee
commit b86b2d3299
1 changed files with 3 additions and 0 deletions

View File

@ -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)