diff options
author | 2014-09-01 20:58:42 +0000 | |
---|---|---|
committer | 2014-09-01 20:58:42 +0000 | |
commit | fe1f094f372f87e214ca78d415573822f6ffc6a6 (patch) | |
tree | d5da2cf32056d6a72d0cb99cf0a8c3ef53c9997c | |
parent | Enable -Wshadow in openssl(1) and fix a few shadow warnings. (diff) | |
download | wireguard-openbsd-fe1f094f372f87e214ca78d415573822f6ffc6a6.tar.xz wireguard-openbsd-fe1f094f372f87e214ca78d415573822f6ffc6a6.zip |
Close fd if fdopen fails
ok gilles@
-rw-r--r-- | usr.sbin/smtpd/queue_api.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.sbin/smtpd/queue_api.c b/usr.sbin/smtpd/queue_api.c index 80561410203..7eaae74c7ed 100644 --- a/usr.sbin/smtpd/queue_api.c +++ b/usr.sbin/smtpd/queue_api.c @@ -1,4 +1,4 @@ -/* $OpenBSD: queue_api.c,v 1.5 2014/07/08 15:45:32 eric Exp $ */ +/* $OpenBSD: queue_api.c,v 1.6 2014/09/01 20:58:42 doug Exp $ */ /* * Copyright (c) 2013 Eric Faurot <eric@openbsd.org> @@ -186,8 +186,12 @@ queue_msg_dispatch(void) } if (ifile) fclose(ifile); + else + close(imsg.fd); if (ofile) fclose(ofile); + else + close(fd); } imsg_compose(&ibuf, PROC_QUEUE_OK, 0, 0, -1, &r, sizeof(r)); |