From: Fernando Tarlá Cardoso Lemos Date: Tue, 29 Jun 2010 23:08:21 +0000 (-0300) Subject: Don't leak skfd on errors. Don't spam stderr if the iface isn't present. X-Git-Tag: 2.2~20 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=570bc669b4ad3c268025b70b217280788f6e23ba;p=i3%2Fi3status Don't leak skfd on errors. Don't spam stderr if the iface isn't present. --- 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; }