Explorar o código

modules_l/presence/notify.c fixed null pointer bug

Added an additional check to avoid a possible dereference of a null pointer.
Marius Bucur %!s(int64=14) %!d(string=hai) anos
pai
achega
058c7ead66
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      modules_k/presence/notify.c

+ 1 - 1
modules_k/presence/notify.c

@@ -1694,7 +1694,7 @@ void p_tm_callback( struct cell *t, int type, struct tmcb_params *ps)
 			((c_back_param*)(*ps->param))->to_tag.s== NULL)
 	{
 		LM_DBG("message id not received\n");
-		if(*ps->param !=NULL  )
+		if(ps->param != NULL && *ps->param !=NULL)
 			free_cbparam((c_back_param*)(*ps->param));
 		return;
 	}