diff options
author | 2016-10-12 10:58:32 +0000 | |
---|---|---|
committer | 2016-10-12 10:58:32 +0000 | |
commit | 2e399b953003a34c04c31c9d3abad42344a2ce09 (patch) | |
tree | 3b01e935f04092f8b49c85a4edfb24406a94e8ff | |
parent | Prevent fd exhaustion in the parent when loading the listening server (diff) | |
download | wireguard-openbsd-2e399b953003a34c04c31c9d3abad42344a2ce09.tar.xz wireguard-openbsd-2e399b953003a34c04c31c9d3abad42344a2ce09.zip |
The error case checks for saved_errno, set it accordingly
-rw-r--r-- | usr.sbin/vmd/config.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/vmd/config.c b/usr.sbin/vmd/config.c index a8198f5583b..c9dd9a22314 100644 --- a/usr.sbin/vmd/config.c +++ b/usr.sbin/vmd/config.c @@ -1,4 +1,4 @@ -/* $OpenBSD: config.c,v 1.14 2016/10/05 17:30:13 reyk Exp $ */ +/* $OpenBSD: config.c,v 1.15 2016/10/12 10:58:32 reyk Exp $ */ /* * Copyright (c) 2015 Reyk Floeter <reyk@openbsd.org> @@ -139,7 +139,7 @@ config_getvm(struct privsep *ps, struct vmop_create_params *vmc, errno = 0; if (vm_getbyname(vcp->vcp_name) != NULL) { - errno = EALREADY; + saved_errno = errno = EALREADY; goto fail; } |