From 570bc669b4ad3c268025b70b217280788f6e23ba Mon Sep 17 00:00:00 2001 From: Fernando Tarlá Cardoso Lemos Date: Tue, 29 Jun 2010 20:08:21 -0300 Subject: Don't leak skfd on errors. Don't spam stderr if the iface isn't present. --- src/print_wireless_info.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/print_wireless_info.c b/src/print_wireless_info.c index 50cf8e4..22a9c31 100644 --- a/src/print_wireless_info.c +++ b/src/print_wireless_info.c @@ -39,7 +39,7 @@ static int get_wireless_info(const char *interface, wireless_info_t *info) { wireless_config wcfg; if (iw_get_basic_config(skfd, interface, &wcfg) < 0) { - perror("iw_get_basic_config"); + close(skfd); return 0; } -- cgit v1.2.3