View | Details | Raw Unified | Return to bug 227551
Collapse All | Expand All

(-)/usr/ports/security/openssh-portable/files/patch-openbsd-compat_port-net.c (+21 lines)
Line 0 Link Here
1
--- openbsd-compat/port-net.c
2
+++ openbsd-compat/port-net.c
3
@@ -185,7 +185,7 @@ sys_tun_open(int tun, int mode, char **ifname)
4
	else
5
 		debug("%s: %s mode %d fd %d", __func__, ifr.ifr_name, mode, fd);
6
 
7
-	if (ifname != NULL && (*ifname = strdup(ifr.ifr_name)))
8
+	if (ifname != NULL && (*ifname = strdup(ifr.ifr_name)) == NULL)
9
 		goto failed;
10
 
11
 	return (fd);
12
@@ -272,7 +272,7 @@ sys_tun_open(int tun, int mode, char **ifname)
13
 		goto failed;
14
 	}
15
 
16
-	if (ifname != NULL && (*ifname = strdup(ifr.ifr_name)))
17
+	if (ifname != NULL && (*ifname = strdup(ifr.ifr_name)) == NULL)
18
 		goto failed;
19
 
20
 	close(sock);
21

Return to bug 227551