Skip to content

Commit 9434236

Browse files
committed
Ensure that ALL fields of the ap_listen_rec structure are initialized
alloc_listener initializes more fields in the created ap_listen_rec structure than alloc_systemd_listener as it has more data to add to this structure. Ensure that all fields of the ap_listen_rec structure are initialized at least with 0 as later code using this structure depends on this. Submitted by: jailletc36 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1926091 13f79535-47bb-0310-9956-ffa450edef68 (cherry picked from commit 32ebb6b)
1 parent 5ca1cab commit 9434236

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

server/listen.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -313,9 +313,7 @@ static apr_status_t alloc_systemd_listener(process_rec * process,
313313
si.type = SOCK_STREAM;
314314
si.protocol = APR_PROTO_TCP;
315315

316-
rec = apr_palloc(process->pool, sizeof(ap_listen_rec));
317-
rec->active = 0;
318-
rec->next = 0;
316+
rec = apr_pcalloc(process->pool, sizeof(ap_listen_rec));
319317

320318

321319
rv = apr_os_sock_make(&rec->sd, &si, process->pool);

0 commit comments

Comments
 (0)