diff options
author | Colin Watson <cjwatson@debian.org> | 2018-08-24 12:49:36 +0100 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2018-08-24 12:49:36 +0100 |
commit | e6547182a54f0f268ee36e7c99319eeddffbaff2 (patch) | |
tree | 417527229ad3f3764ba71ea383f478a168895087 /openbsd-compat/port-net.c | |
parent | ed6ae9c1a014a08ff5db3d768f01f2e427eeb476 (diff) | |
parent | 71508e06fab14bc415a79a08f5535ad7bffa93d9 (diff) |
Import openssh_7.8p1.orig.tar.gz
Diffstat (limited to 'openbsd-compat/port-net.c')
-rw-r--r-- | openbsd-compat/port-net.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/openbsd-compat/port-net.c b/openbsd-compat/port-net.c index 7050629c3..bb535626f 100644 --- a/openbsd-compat/port-net.c +++ b/openbsd-compat/port-net.c | |||
@@ -185,7 +185,7 @@ sys_tun_open(int tun, int mode, char **ifname) | |||
185 | else | 185 | else |
186 | debug("%s: %s mode %d fd %d", __func__, ifr.ifr_name, mode, fd); | 186 | debug("%s: %s mode %d fd %d", __func__, ifr.ifr_name, mode, fd); |
187 | 187 | ||
188 | if (ifname != NULL && (*ifname = strdup(ifr.ifr_name))) | 188 | if (ifname != NULL && (*ifname = strdup(ifr.ifr_name)) == NULL) |
189 | goto failed; | 189 | goto failed; |
190 | 190 | ||
191 | return (fd); | 191 | return (fd); |
@@ -272,7 +272,7 @@ sys_tun_open(int tun, int mode, char **ifname) | |||
272 | goto failed; | 272 | goto failed; |
273 | } | 273 | } |
274 | 274 | ||
275 | if (ifname != NULL && (*ifname = strdup(ifr.ifr_name))) | 275 | if (ifname != NULL && (*ifname = strdup(ifr.ifr_name)) == NULL) |
276 | goto failed; | 276 | goto failed; |
277 | 277 | ||
278 | close(sock); | 278 | close(sock); |