summaryrefslogtreecommitdiff
path: root/usr.sbin/smtpd/mta.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/smtpd/mta.c')
-rw-r--r--usr.sbin/smtpd/mta.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/usr.sbin/smtpd/mta.c b/usr.sbin/smtpd/mta.c
index 264a0f82372..e0aa972fd2b 100644
--- a/usr.sbin/smtpd/mta.c
+++ b/usr.sbin/smtpd/mta.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mta.c,v 1.141 2012/09/16 16:43:28 chl Exp $ */
+/* $OpenBSD: mta.c,v 1.142 2012/09/18 14:23:01 eric Exp $ */
/*
* Copyright (c) 2008 Pierre-Yves Ritschard <pyr@openbsd.org>
@@ -93,9 +93,7 @@ mta_imsg(struct imsgev *iev, struct imsg *imsg)
return;
case IMSG_BATCH_APPEND:
- e = xmalloc(sizeof *e, "mta:envelope");
- memmove(e, imsg->data, sizeof *e);
-
+ e = xmemdup(imsg->data, sizeof *e, "mta:envelope");
route = mta_route_for(e);
batch = tree_xget(&batches, e->batch_id);