summaryrefslogtreecommitdiff
path: root/usr.sbin/radiusd
diff options
context:
space:
mode:
authorYASUOKA Masahiko <yasuoka@cvs.openbsd.org>2015-10-27 04:30:45 +0000
committerYASUOKA Masahiko <yasuoka@cvs.openbsd.org>2015-10-27 04:30:45 +0000
commit252d051141b0ca5bcc2b073b9aa6c1adf36046fc (patch)
tree7fac357575ffaf46be422f09caf3a6dc25e117cd /usr.sbin/radiusd
parent5a678f5a57609475420643b751991409b1b3f4ac (diff)
Initialize module_radius_req before use it.
diff from Yuuichi Someya
Diffstat (limited to 'usr.sbin/radiusd')
-rw-r--r--usr.sbin/radiusd/radiusd_radius.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/radiusd/radiusd_radius.c b/usr.sbin/radiusd/radiusd_radius.c
index 80153846389..25127d3b777 100644
--- a/usr.sbin/radiusd/radiusd_radius.c
+++ b/usr.sbin/radiusd/radiusd_radius.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: radiusd_radius.c,v 1.9 2015/10/27 04:27:01 yasuoka Exp $ */
+/* $OpenBSD: radiusd_radius.c,v 1.10 2015/10/27 04:30:44 yasuoka Exp $ */
/*
* Copyright (c) 2013 Internet Initiative Japan Inc.
@@ -278,7 +278,7 @@ module_radius_access_request(void *ctx, u_int q_id, const u_char *pkt,
u_char attrbuf[256];
ssize_t attrlen;
- req = malloc(sizeof(struct module_radius_req));
+ req = calloc(1, sizeof(struct module_radius_req));
if (req == NULL) {
module_radius_log(module, LOG_WARNING,
"%s: Out of memory: %m", __func__);