client/ClientRead: call Break() before Close()

Referencing the attribute "partition" is illegal after Close(),
because Close() deletes "this".
This commit is contained in:
Max Kellermann 2016-07-07 13:52:33 +02:00
parent b46cf57d98
commit e6389ff5a1
2 changed files with 2 additions and 2 deletions

2
NEWS
View File

@ -5,7 +5,7 @@ ver 0.19.17 (not yet released)
* fix spurious seek error "Failed to allocate silence buffer"
* replay gain: fix "replay_gain_handler mixer" setting
* DSD: use 0x69 as silence pattern
* fix use-after-free bug on "close"
* fix use-after-free bug on "close" and "kill"
ver 0.19.16 (2016/06/13)
* faster seeking

View File

@ -52,8 +52,8 @@ Client::OnSocketInput(void *data, size_t length)
break;
case CommandResult::KILL:
Close();
partition.instance.event_loop->Break();
Close();
return InputResult::CLOSED;
case CommandResult::FINISH: