Fix a bug in wifi_essid().
When an invalid interface name is passed to wifi_essid() it does not close opened sockets.
This commit is contained in:
		@@ -77,6 +77,7 @@ wifi_essid(const char *iface)
 | 
			
		||||
	wreq.u.essid.pointer = id;
 | 
			
		||||
	if (ioctl(sockfd,SIOCGIWESSID, &wreq) == -1) {
 | 
			
		||||
		warn("Failed to get ESSID for interface %s", iface);
 | 
			
		||||
		close(sockfd);
 | 
			
		||||
		return NULL;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user