commit 07f2f83defcb35f4c99780b8f469c297c8dead8b
parent 807764614be04aa74e0ef8d7df7657713a643a1a
Author: Joris Vink <joris@coders.se>
Date: Thu, 2 May 2013 13:47:53 +0200
make sure we do not dereference p if its NULL
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/module.c b/src/module.c
@@ -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);
}