summaryrefslogtreecommitdiff
path: root/sbin/unwind/frontend.c
diff options
context:
space:
mode:
authorFlorian Obser <florian@cvs.openbsd.org>2019-10-08 15:50:26 +0000
committerFlorian Obser <florian@cvs.openbsd.org>2019-10-08 15:50:26 +0000
commit6bdc57e064b89e653d332bcd142bb263a9a275ba (patch)
treefc7d38ea4216c558187b845d3db4bf3bf8c73fb4 /sbin/unwind/frontend.c
parentb3adc944969000bc39c7d5b83aec68492bfe78c0 (diff)
Make sure struct pending_query is fully initialized by using calloc.
Doesn't matter currently but lead to some head scratching while working on new things.
Diffstat (limited to 'sbin/unwind/frontend.c')
-rw-r--r--sbin/unwind/frontend.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/unwind/frontend.c b/sbin/unwind/frontend.c
index 483edc0d354..3ff588d354f 100644
--- a/sbin/unwind/frontend.c
+++ b/sbin/unwind/frontend.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: frontend.c,v 1.26 2019/10/06 09:25:21 florian Exp $ */
+/* $OpenBSD: frontend.c,v 1.27 2019/10/08 15:50:25 florian Exp $ */
/*
* Copyright (c) 2018 Florian Obser <florian@openbsd.org>
@@ -700,7 +700,7 @@ udp_receive(int fd, short events, void *arg)
queryp += 4;
rem_len -= 4;
- if ((pq = malloc(sizeof(*pq))) == NULL) {
+ if ((pq = calloc(1, sizeof(*pq))) == NULL) {
log_warn(NULL);
return;
}