summaryrefslogtreecommitdiff
path: root/usr.sbin/smtpd/smtpctl.c
diff options
context:
space:
mode:
authorJacek Masiulaniec <jacekm@cvs.openbsd.org>2009-02-17 22:49:23 +0000
committerJacek Masiulaniec <jacekm@cvs.openbsd.org>2009-02-17 22:49:23 +0000
commita867855445ba4c176695a9ea07d1916cb1c74157 (patch)
tree525d73fc55c2d85d02ea968ef619e20a0bda0cc6 /usr.sbin/smtpd/smtpctl.c
parent84a6f059873250e82f8264aeea18064e10fa1d12 (diff)
imsg_init depends on ibuf being calloc'd. fix few places where malloc
is used instead; ok gilles@ Problem made visible by malloc.conf = AFGJ, and pointed out by otto@
Diffstat (limited to 'usr.sbin/smtpd/smtpctl.c')
-rw-r--r--usr.sbin/smtpd/smtpctl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/smtpd/smtpctl.c b/usr.sbin/smtpd/smtpctl.c
index 5faf4c81e05..be79ed772c4 100644
--- a/usr.sbin/smtpd/smtpctl.c
+++ b/usr.sbin/smtpd/smtpctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: smtpctl.c,v 1.13 2009/02/13 20:44:46 jacekm Exp $ */
+/* $OpenBSD: smtpctl.c,v 1.14 2009/02/17 22:49:22 jacekm Exp $ */
/*
* Copyright (c) 2006 Pierre-Yves Ritschard <pyr@openbsd.org>
@@ -133,7 +133,7 @@ connected:
if (connect(ctl_sock, (struct sockaddr *)&sun, sizeof(sun)) == -1)
err(1, "connect: %s", SMTPD_SOCKET);
- if ((ibuf = malloc(sizeof(struct imsgbuf))) == NULL)
+ if ((ibuf = calloc(1, sizeof(struct imsgbuf))) == NULL)
err(1, NULL);
imsg_init(ibuf, ctl_sock, NULL);