h2generic.cpp: fix use after free.

Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
This commit is contained in:
Murai Takashi 2017-01-09 05:38:38 +09:00 committed by Augustin Cavalier
parent e6004b7729
commit 7cfdd9242c

View File

@ -149,6 +149,7 @@ bail1:
delete_sem(new_bt_dev->cmd_complete);
bail0:
free(new_bt_dev);
new_bt_dev = NULL;
exit:
return new_bt_dev;
}