Fixed memroy leak

This commit is contained in:
7u83 2022-08-26 19:33:57 +02:00
parent 276a282369
commit e3ccf2a93c
1 changed files with 3 additions and 1 deletions

View File

@ -214,7 +214,8 @@ struct cw_DiscoveryResults * cw_run_discovery(struct cw_Conn *conn, const char *
if (brc < 0) {
cw_log(LOG_ERR, "Can't bind to %s",
sock_addr2str(&bind_address, sock_buf));
return 0;
results = 0;
goto errX;
}
}
@ -233,6 +234,7 @@ struct cw_DiscoveryResults * cw_run_discovery(struct cw_Conn *conn, const char *
}
errX:
freeaddrinfo(res0);