[libsoup/return-if-client_io-is-null] Exit callback 'response_network_stream_read_data_cb' if client_io is null
- From: Diego Pino <dpino src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libsoup/return-if-client_io-is-null] Exit callback 'response_network_stream_read_data_cb' if client_io is null
- Date: Tue, 11 May 2021 06:51:18 +0000 (UTC)
commit fbf88a67bc0f4cccbdf01aefcb529bbf0926d5d4
Author: Diego Pino Garcia <dpino igalia com>
Date: Tue May 11 14:47:29 2021 +0800
Exit callback 'response_network_stream_read_data_cb' if client_io is null
libsoup/soup-client-message-io-http1.c | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/libsoup/soup-client-message-io-http1.c b/libsoup/soup-client-message-io-http1.c
index b2279a7c..4bbf680f 100644
--- a/libsoup/soup-client-message-io-http1.c
+++ b/libsoup/soup-client-message-io-http1.c
@@ -516,6 +516,9 @@ response_network_stream_read_data_cb (SoupMessage *msg,
{
SoupClientMessageIOHTTP1 *client_io = (SoupClientMessageIOHTTP1 *)soup_message_get_io_data (msg);
+ if (!client_io)
+ return;
+
if (client_io->base.read_state < SOUP_MESSAGE_IO_STATE_BODY_START)
client_io->metrics->response_header_bytes_received += count;
else
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]