瀏覽代碼

modules_l/presence/notify.c fixed null pointer bug

Added an additional check to avoid a possible dereference of a null pointer.
Marius Bucur 14 年之前
父節點
當前提交
058c7ead66
共有 1 個文件被更改,包括 1 次插入1 次删除
  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;
 	}