On Mon, Sep 11, 2017 at 09:12:18AM +0100, Frediano Ziglio wrote: > Remove some leaks. I would not really call these a leak, it's just memory which is still reachable when the program exits, but not explicitly freed. Acked-by: Christophe Fergeau <cfergeau@xxxxxxxxxx> > > Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx> > --- > server/tests/test-gst.c | 15 +++++++++++++++ > 1 file changed, 15 insertions(+) > > diff --git a/server/tests/test-gst.c b/server/tests/test-gst.c > index 224a891b1..ca187d527 100644 > --- a/server/tests/test-gst.c > +++ b/server/tests/test-gst.c > @@ -172,6 +172,7 @@ static TestFrame *gst_to_spice_frame(GstSample *sample); > static void bitmap_free(SpiceBitmap *bitmap); > static void frame_ref(TestFrame *frame); > static void frame_unref(TestFrame *frame); > +static void pipeline_free(TestPipeline *pipeline); > static void pipeline_send_raw_data(TestPipeline *pipeline, VideoBuffer *buffer); > static void pipeline_wait_eos(TestPipeline *pipeline); > static void create_input_pipeline(const char *input_pipeline, > @@ -432,6 +433,9 @@ int main(int argc, char *argv[]) > exit(1); > } > > + pipeline_free(input_pipeline); > + pipeline_free(output_pipeline); > + > g_free(encoder_name); > g_free(image_format); > g_free(input_pipeline_desc); > @@ -613,6 +617,17 @@ create_pipeline(const char *desc, SampleProc sample_proc, void *param) > } > > static void > +pipeline_free(TestPipeline *pipeline) > +{ > + if (pipeline->appsrc) { > + gst_object_unref(pipeline->appsrc); > + } > + gst_object_unref(pipeline->appsink); > + gst_object_unref(pipeline->gst_pipeline); > + free(pipeline); > +} > + > +static void > create_output_pipeline(const EncoderInfo *encoder, SampleProc sample_proc, void *param) > { > gchar *desc = > -- > 2.13.5 > > _______________________________________________ > Spice-devel mailing list > Spice-devel@xxxxxxxxxxxxxxxxxxxxx > https://lists.freedesktop.org/mailman/listinfo/spice-devel _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/spice-devel