From b75667176b7a7c420085e1b8d810c59454b39ee9 Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Fri, 10 Nov 2017 12:25:58 +0100 Subject: [PATCH] fix memleak, init and compil --- common/ca_ci.cpp | 2 +- libarmbox/playback_gst.cpp | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/common/ca_ci.cpp b/common/ca_ci.cpp index c4a2b06..4698637 100644 --- a/common/ca_ci.cpp +++ b/common/ca_ci.cpp @@ -1037,7 +1037,7 @@ void cCA::setInputs() if (fd) { printf("set input%d to tuner %s\n", number, getTunerLetter(number).c_str()); - fprintf(fd, getTunerLetter(number).c_str()); + fprintf(fd,"%s", getTunerLetter(number).c_str()); } else { diff --git a/libarmbox/playback_gst.cpp b/libarmbox/playback_gst.cpp index 6542c2e..cc7ee03 100644 --- a/libarmbox/playback_gst.cpp +++ b/libarmbox/playback_gst.cpp @@ -325,7 +325,7 @@ GstBusSyncReply Gst_bus_call(GstBus *bus, GstMessage *msg, gpointer user_data) case GST_STATE_CHANGE_READY_TO_PAUSED: { GstIterator *children; - GValue r = { 0, }; + GValue r = G_VALUE_INIT; if (audioSink) { @@ -390,6 +390,8 @@ GstBusSyncReply Gst_bus_call(GstBus *bus, GstMessage *msg, gpointer user_data) default: break; } + if(sourceName) + g_free(sourceName); return GST_BUS_DROP; }