summaryrefslogtreecommitdiffstats
path: root/contrib/ipfilter/lib/alist_new.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/ipfilter/lib/alist_new.c')
-rw-r--r--contrib/ipfilter/lib/alist_new.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/contrib/ipfilter/lib/alist_new.c b/contrib/ipfilter/lib/alist_new.c
index 72da866..50a4275 100644
--- a/contrib/ipfilter/lib/alist_new.c
+++ b/contrib/ipfilter/lib/alist_new.c
@@ -3,7 +3,7 @@
*
* See the IPFILTER.LICENCE file for details on licencing.
*
- * $Id: alist_new.c,v 1.1.2.2 2006/08/25 22:43:21 darrenr Exp $
+ * $Id: alist_new.c,v 1.1.2.3 2007/06/06 08:05:33 darrenr Exp $
*/
#include "ipf.h"
@@ -53,12 +53,14 @@ alist_new(int v, char *host)
}
if (gethost(host, &al->al_addr) == -1) {
- *slash = '/';
+ if (slash != NULL)
+ *slash = '/';
fprintf(stderr, "Cannot parse hostname\n");
free(al);
return NULL;
}
al->al_mask = htonl(mask);
- *slash = '/';
+ if (slash != NULL)
+ *slash = '/';
return al;
}
OpenPOWER on IntegriCloud