mirror of https://gerrit.osmocom.org/libosmocore
gprs_ns2: allow to use free_vc() with NULL
Usually talloc_free() and other free functions in osmocom allows to be called with NULL which is then ignored. Change-Id: If7b0c6916a29d4611d0a40c388414076eb83e6b5
This commit is contained in:
parent
55bc86931e
commit
ea37724b3c
|
@ -101,7 +101,8 @@ struct priv_vc {
|
|||
|
||||
static void free_vc(struct gprs_ns2_vc *nsvc)
|
||||
{
|
||||
OSMO_ASSERT(nsvc);
|
||||
if (!nsvc)
|
||||
return;
|
||||
|
||||
if (!nsvc->priv)
|
||||
return;
|
||||
|
|
|
@ -73,6 +73,9 @@ static void free_bind(struct gprs_ns2_vc_bind *bind)
|
|||
|
||||
static void free_vc(struct gprs_ns2_vc *nsvc)
|
||||
{
|
||||
if (!nsvc)
|
||||
return;
|
||||
|
||||
if (!nsvc->priv)
|
||||
return;
|
||||
|
||||
|
|
Loading…
Reference in New Issue