If the addr pointer is NULL, better to check first before using it.
This commit is contained in:
parent
a710841123
commit
3f2f393a7c
|
@ -213,12 +213,11 @@ int exprValListGetAddress(exprValList * vlist, char *name, EXPRTYPE ** addr)
|
|||
exprVal *cur;
|
||||
int result;
|
||||
|
||||
/* Not found yet */
|
||||
*addr = NULL;
|
||||
|
||||
if (vlist == NULL || addr == NULL)
|
||||
return EXPR_ERROR_NULLPOINTER;
|
||||
|
||||
/* Not found yet */
|
||||
*addr = NULL;
|
||||
|
||||
if (name == NULL || name[0] == '\0')
|
||||
return EXPR_ERROR_NOTFOUND;
|
||||
|
|
Loading…
Reference in New Issue