diff options
author | Carlos Garcia Campos <cgarcia@igalia.com> | 2022-10-21 11:30:19 +0200 |
---|---|---|
committer | Carlos Garcia Campos <carlosgc@gnome.org> | 2022-10-21 12:25:02 +0000 |
commit | 6c06a44ac8eae1804924270b283613df76194ac4 (patch) | |
tree | c23c9d7455b6d0f0928d545fc6f85ea02be74315 | |
parent | d38bbf52fe6f3504829e02dd52c4a6d008e30031 (diff) | |
download | libsoup-6c06a44ac8eae1804924270b283613df76194ac4.tar.gz |
server: return early from io_run if server io doesn't match after io_run_until()
It happens when the io data is destroyed during the io_run_until().
Fixes #309
-rw-r--r-- | libsoup/server/http1/soup-server-message-io-http1.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libsoup/server/http1/soup-server-message-io-http1.c b/libsoup/server/http1/soup-server-message-io-http1.c index 8d1be9ab..90139f2b 100644 --- a/libsoup/server/http1/soup-server-message-io-http1.c +++ b/libsoup/server/http1/soup-server-message-io-http1.c @@ -925,6 +925,14 @@ io_run (SoupServerMessageIOHTTP1 *server_io) SOUP_MESSAGE_IO_STATE_DONE, SOUP_MESSAGE_IO_STATE_DONE, &error); + + if (soup_server_message_get_io_data (msg) != (SoupServerMessageIO *)server_io) { + g_object_unref (msg); + g_clear_error (&error); + + return; + } + server_io->in_io_run = FALSE; if (success) { |