ctrl_connection: Initialize write_queue.bfd.fd to -1 during allocation

Otherwise fd is set to 0 by default, let's avoid accidentally closing
it if something goes wrong.

Change-Id: I98f744d2880fbb883719cdf1d3eb31f2b22a13b6
This commit is contained in:
Pau Espin 2021-01-27 16:54:15 +01:00 committed by pespin
parent 9043205cd9
commit 377645d600
1 changed files with 1 additions and 0 deletions

View File

@ -514,6 +514,7 @@ struct ctrl_connection *osmo_ctrl_conn_alloc(void *ctx, void *data)
INIT_LLIST_HEAD(&ccon->def_cmds);
ccon->write_queue.bfd.data = data;
ccon->write_queue.bfd.fd = -1;
ccon->write_queue.write_cb = control_write_cb;
ccon->write_queue.read_cb = handle_control_read;