PengZheng commented on code in PR #448: URL: https://github.com/apache/celix/pull/448#discussion_r1034269276
########## bundles/pubsub/pubsub_admin_tcp/src/pubsub_tcp_handler.c: ########## @@ -607,6 +607,7 @@ int pubsub_tcpHandler_listen(pubsub_tcpHandler_t *handle, char *url) { } celixThreadRwlock_unlock(&handle->dbLock); } else { + free(pUrl); Review Comment: ~~Then the fd leakage in `else` branch is fixed, while the leakage in the `if` branch remains, e.g., when `rc = listen(fd, SOMAXCONN);` failed. It's OK to leave it there, and adding a `FIXME` reminder would be nice.~~ I have improved the error injection technique mentioned in #393 so that it can be deployed easily in CMake projects. To be honest, the one in #393 is ugly and cumbersome to use. Once we have such mechanism in place, emulating socket listening error is fairly easy, and code coverage will not be a problem. I plan to upstream it when working on #441. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@celix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org