]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
If the addr pointer is NULL, better to check first before using it.
authorWilliam King <william.king@quentustech.com>
Thu, 13 Jun 2013 04:23:52 +0000 (21:23 -0700)
committerWilliam King <william.king@quentustech.com>
Thu, 13 Jun 2013 04:24:06 +0000 (21:24 -0700)
src/mod/applications/mod_expr/exprval.c

index 856c0f1e7fad0370ed63d8a09a348615839843cd..b0efaa8453265a1e9fca46db604379f917c56af8 100644 (file)
@@ -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;