mirror of git://git.sysmocom.de/ofono
gatppp: Check ppp instance before unref it
This commit is contained in:
parent
07b26d2dee
commit
b86b2d3299
|
@ -446,6 +446,9 @@ void g_at_ppp_unref(GAtPPP *ppp)
|
||||||
{
|
{
|
||||||
gboolean is_zero;
|
gboolean is_zero;
|
||||||
|
|
||||||
|
if (ppp == NULL)
|
||||||
|
return;
|
||||||
|
|
||||||
is_zero = g_atomic_int_dec_and_test(&ppp->ref_count);
|
is_zero = g_atomic_int_dec_and_test(&ppp->ref_count);
|
||||||
|
|
||||||
if (is_zero == FALSE)
|
if (is_zero == FALSE)
|
||||||
|
|
Loading…
Reference in New Issue