]> git.ipfire.org Git - thirdparty/iw.git/blobdiff - survey.c
iw: fix fd leak inside handle_netns
[thirdparty/iw.git] / survey.c
index 0810d0c2721ef3288504521e9a433ebd51b25881..9325353e4ba1d35acc190a6b26d2852f7b43fbca 100644 (file)
--- a/survey.c
+++ b/survey.c
@@ -1,6 +1,4 @@
 #include <net/if.h>
-#include <errno.h>
-#include <string.h>
 
 #include <netlink/genl/genl.h>
 #include <netlink/genl/family.h>
@@ -69,11 +67,11 @@ static int print_survey_handler(struct nl_msg *msg, void *arg)
 }
 
 static int handle_survey_dump(struct nl80211_state *state,
-                              struct nl_cb *cb,
-                              struct nl_msg *msg,
-                              int argc, char **argv)
+                             struct nl_msg *msg,
+                             int argc, char **argv,
+                             enum id_input id)
 {
-       nl_cb_set(cb, NL_CB_VALID, NL_CB_CUSTOM, print_survey_handler, NULL);
+       register_handler(print_survey_handler, NULL);
        return 0;
 }
 COMMAND(survey, dump, NULL,