scan: Add ref to cmd to make it reusable on failure

This commit is contained in:
Tim Kourt 2019-02-27 13:59:01 -08:00 committed by Denis Kenzior
parent 917815e99a
commit 45e5c42726
1 changed files with 3 additions and 0 deletions

View File

@ -454,8 +454,11 @@ static int scan_request_send_next(struct scan_context *sc,
sc->start_cmd_id = scan_send_start(&cmd, scan_request_triggered, sc);
if (sc->start_cmd_id) {
l_genl_msg_ref(cmd);
sc->triggered = false;
sc->current_sr = sr;
return 0;
}