Archived
3
0

Put fd to -1 before freeing memory.

This commit is contained in:
Philippe PITTOLI 2020-01-28 13:42:19 +01:00
parent ac9e329cec
commit 8457cc3690

View File

@ -563,6 +563,7 @@ struct ipc_error ipc_del_fd (struct ipc_connection_infos *cinfos, int fd)
size_t i;
for (i = 0; i < cinfos->size; i++) {
if (cinfos->cinfos[i]->fd == fd) {
cinfos->cinfos[i]->fd = -1;
free (cinfos->cinfos[i]);
cinfos->size--;
if (cinfos->size == 0) {