Skip to content

Commit edf9d74

Browse files
committed
- Fix code analyzer warning, and bail out of handle_tcp_writing
and handle_tls_writing early when data->query is NULL.
1 parent f652a9a commit edf9d74

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

doc/ChangeLog

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
5 August 2025: Wouter
55
- Merge #454 from jaredmauch: handle rare case but seen in
66
production where data->query is NULL.
7+
- Fix code analyzer warning, and bail out of handle_tcp_writing
8+
and handle_tls_writing early when data->query is NULL.
79

810
18 July 2025: Wouter
911
- Merge #449: Add useful logging for XoT transfers.

server.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4726,8 +4726,9 @@ handle_tcp_writing(int fd, short event, void* arg)
47264726
struct event_base* ev_base;
47274727
uint32_t now = 0;
47284728

4729-
if ((event & EV_TIMEOUT)) {
4729+
if ((event & EV_TIMEOUT) || !q) {
47304730
/* Connection timed out. */
4731+
/* Or data->query is NULL, in which case nothing to do. */
47314732
cleanup_tcp_handler(data);
47324733
return;
47334734
}
@@ -5329,8 +5330,9 @@ handle_tls_writing(int fd, short event, void* arg)
53295330
buffer_type* write_buffer;
53305331
uint32_t now = 0;
53315332

5332-
if ((event & EV_TIMEOUT)) {
5333+
if ((event & EV_TIMEOUT) || !q) {
53335334
/* Connection timed out. */
5335+
/* Or data->query is NULL, in which case nothing to do. */
53345336
cleanup_tcp_handler(data);
53355337
return;
53365338
}

0 commit comments

Comments
 (0)