iw: scan: fix double-free in error paths
Hit when, for instance, I'm stupid enough to type an invalid scan
command:
# iw wlan0 scan -h
BUG at file position lib/msg.c:572:void nlmsg_free(struct nl_msg *)
iw: lib/msg.c:572: void nlmsg_free(struct nl_msg *): Assertion `0' failed.
Aborted (core dumped)
Fixes: 2f74c59cf11e ("iw: fix memory leaks inside handle_scan")
Cc: John Crispin <john@phrozen.org>
Signed-off-by: Brian Norris <briannorris@chromium.org>
Link: https://lore.kernel.org/r/20191121224139.58281-1-briannorris@chromium.org
Signed-off-by: Johannes Berg <johannes.berg@intel.com>