make sure we do not dereference p if its NULL

This commit is contained in:
Joris Vink 2013-05-02 13:47:53 +02:00
parent 807764614b
commit 07f2f83def
1 changed files with 1 additions and 1 deletions

View File

@ -110,7 +110,7 @@ kore_module_handler_find(char *domain, char *path)
TAILQ_FOREACH(hdlr, &handlers, list) {
if (hdlr->uri[0] != '.' && !strcmp(hdlr->uri, uri))
return (hdlr->func);
if (hdlr->uri[0] == '.' && !strcmp(hdlr->uri, p))
if (p != NULL && hdlr->uri[0] == '.' && !strcmp(hdlr->uri, p))
return (hdlr->func);
}