memory leak in AirPlay

This commit is contained in:
philippe44
2019-08-23 00:23:00 -07:00
parent 0ee2783b49
commit 8a0763cc27
4 changed files with 30 additions and 29 deletions

View File

@@ -109,6 +109,7 @@ bool led_unconfig(int idx) {
if (idx >= MAX_LED) return false;
if (leds[idx].timer) xTimerDelete(leds[idx].timer, BLOCKTIME);
leds[idx].timer = NULL;
return true;
}

View File

@@ -168,7 +168,6 @@ struct raop_ctx_s *raop_create(struct in_addr host, char *name,
}
#ifdef WIN32
getsockname(ctx->sock, (struct sockaddr *) &addr, &nlen);
ctx->port = ntohs(addr.sin_port);
#endif

View File

@@ -80,7 +80,7 @@
#define RTP_SYNC (0x01)
#define NTP_SYNC (0x02)
#define RESEND_TO 200
#define RESEND_TO 200
enum { DATA = 0, CONTROL, TIMING };
@@ -291,13 +291,14 @@ void rtp_end(rtp_t *ctx)
#else
ctx->joiner = xTaskGetCurrentTaskHandle();
xTaskNotifyWait(0, 0, NULL, portMAX_DELAY);
#endif
}
#endif
}
for (i = 0; i < 3; i++) closesocket(ctx->rtp_sockets[i].sock);
delete_alac(ctx->alac_codec);
if (ctx->decrypt_buf) free(ctx->decrypt_buf);
pthread_mutex_destroy(&ctx->ab_mutex);
buffer_release(ctx->audio_buffer);
free(ctx);