summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFernando Tarlá Cardoso Lemos <fernandotcl@gmail.com>2010-06-29 20:08:21 -0300
committerMichael Stapelberg <michael@stapelberg.de>2010-06-30 10:49:40 +0200
commit570bc669b4ad3c268025b70b217280788f6e23ba (patch)
tree0c799c91485fea3465c778991a6ede8fd649f47a
parent9db8f7221afbf2c1dead8c0ef689007f3b0838a9 (diff)
Don't leak skfd on errors. Don't spam stderr if the iface isn't present.
-rw-r--r--src/print_wireless_info.c2
1 files changed, 1 insertions, 1 deletions
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;
}