From 7deb5182d520ffeff4a8f61b99edac5c0e6a74c6 Mon Sep 17 00:00:00 2001 From: Linus Nordberg Date: Mon, 15 Nov 2010 14:47:19 +0100 Subject: "Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end." --- radsecproxy.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/radsecproxy.c b/radsecproxy.c index 2276d40..f026fee 100644 --- a/radsecproxy.c +++ b/radsecproxy.c @@ -2417,10 +2417,12 @@ struct modattr *extractmodattr(char *nameval) { struct rewrite *getrewrite(char *alt1, char *alt2) { struct rewrite *r; - if ((r = hash_read(rewriteconfs, alt1, strlen(alt1)))) - return r; - if ((r = hash_read(rewriteconfs, alt2, strlen(alt2)))) - return r; + if (alt1) + if ((r = hash_read(rewriteconfs, alt1, strlen(alt1)))) + return r; + if (alt2) + if ((r = hash_read(rewriteconfs, alt2, strlen(alt2)))) + return r; return NULL; } -- cgit v1.1