From c56f414229057cd5b24dd2b589f0f60637aa5404 Mon Sep 17 00:00:00 2001 From: Saxon1 Date: Sun, 6 May 2018 00:10:54 +0930 Subject: [PATCH] trying something else --- rtmp/RTMPWrapper.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rtmp/RTMPWrapper.c b/rtmp/RTMPWrapper.c index 1919a8ab..f63e76d7 100644 --- a/rtmp/RTMPWrapper.c +++ b/rtmp/RTMPWrapper.c @@ -70,14 +70,17 @@ unsigned int RTMP_write_frame(char* data, uint data_length){ if (!RTMP_IsConnected(rtmp)) { printf("RTMP is not connected!\n"); free(dataForC); + free(data); return 0; } if (!RTMP_Write(rtmp, (const char*)data, data_length)) { printf("RTMP write error!\n"); free(dataForC); + free(data); return 0; } free(dataForC); + free(data); return 1; }