]> git.ipfire.org Git - thirdparty/iw.git/blob - p2p.c
iw: Fix memory leak in error path
[thirdparty/iw.git] / p2p.c
1 #include <errno.h>
2 #include <string.h>
3
4 #include <netlink/genl/genl.h>
5 #include <netlink/genl/family.h>
6 #include <netlink/genl/ctrl.h>
7 #include <netlink/msg.h>
8 #include <netlink/attr.h>
9
10 #include "nl80211.h"
11 #include "iw.h"
12
13 SECTION(p2p);
14
15 static int handle_p2p_start(struct nl80211_state *state,
16 struct nl_msg *msg, int argc, char **argv,
17 enum id_input id)
18 {
19 return 0;
20 }
21 COMMAND(p2p, start, "", NL80211_CMD_START_P2P_DEVICE, 0, CIB_WDEV, handle_p2p_start, "");
22
23 static int handle_p2p_stop(struct nl80211_state *state,
24 struct nl_msg *msg, int argc, char **argv,
25 enum id_input id)
26 {
27 return 0;
28 }
29 COMMAND(p2p, stop, "", NL80211_CMD_STOP_P2P_DEVICE, 0, CIB_WDEV, handle_p2p_stop, "");