mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2025-12-09 13:07:03 +03:00
proper close order on error - release
This commit is contained in:
@@ -168,8 +168,8 @@ struct raop_ctx_s *raop_create(struct in_addr host, char *name,
|
||||
addr.sin_port = htons(ctx->port);
|
||||
#endif
|
||||
|
||||
if (bind(ctx->sock, (struct sockaddr *) &addr, sizeof(addr)) < 0 || listen(ctx->sock, 1)) {
|
||||
LOG_ERROR("Cannot bind or listen RTSP listener: %s", strerror(errno));
|
||||
LOG_ERROR("Cannot bind or listen RTSP listener: %s", strerror(errno));
|
||||
closesocket(ctx->sock);
|
||||
free(ctx);
|
||||
return NULL;
|
||||
|
||||
Reference in New Issue
Block a user