diff options
author | gilles <gilles@openbsd.org> | 2019-10-03 04:51:15 +0000 |
---|---|---|
committer | gilles <gilles@openbsd.org> | 2019-10-03 04:51:15 +0000 |
commit | f79cd879c0c4428e9c40cfa292707da0ccedb037 (patch) | |
tree | 5c749f6a18fea996328ff703b4a245f9a4414dd8 | |
parent | fix memory leak in error code path (diff) | |
download | wireguard-openbsd-f79cd879c0c4428e9c40cfa292707da0ccedb037.tar.xz wireguard-openbsd-f79cd879c0c4428e9c40cfa292707da0ccedb037.zip |
fatal() if imsg_flush() call fails in table proc
-rw-r--r-- | usr.sbin/smtpd/table_proc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/smtpd/table_proc.c b/usr.sbin/smtpd/table_proc.c index 50592a74463..dad041a47c3 100644 --- a/usr.sbin/smtpd/table_proc.c +++ b/usr.sbin/smtpd/table_proc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: table_proc.c,v 1.15 2018/12/27 14:23:41 eric Exp $ */ +/* $OpenBSD: table_proc.c,v 1.16 2019/10/03 04:51:15 gilles Exp $ */ /* * Copyright (c) 2013 Eric Faurot <eric@openbsd.org> @@ -165,7 +165,8 @@ table_proc_close(struct table *table) struct table_proc_priv *priv = table->t_handle; imsg_compose(&priv->ibuf, PROC_TABLE_CLOSE, 0, 0, -1, NULL, 0); - imsg_flush(&priv->ibuf); + if (imsg_flush(&priv->ibuf) == -1) + fatal("imsg_flush"); table->t_handle = NULL; } |