From 0aa17031c36ae3caa60d184e3b25ff53417e6c5f Mon Sep 17 00:00:00 2001 From: "Joshua M. Doe" Date: Tue, 9 May 2017 14:53:36 -0400 Subject: [PATCH] matroxsrc: reverse order of calls to Mil*Free --- sys/matrox/gstmatroxsrc.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sys/matrox/gstmatroxsrc.c b/sys/matrox/gstmatroxsrc.c index 56d2e42..a1151b4 100644 --- a/sys/matrox/gstmatroxsrc.c +++ b/sys/matrox/gstmatroxsrc.c @@ -183,9 +183,9 @@ gst_matroxsrc_reset (GstMatroxSrc * src) src->MilGrabBufferList = NULL; } - if (src->MilApplication) { - MappFree (src->MilApplication); - src->MilApplication = M_NULL; + if (src->MilDigitizer) { + MdigFree (src->MilDigitizer); + src->MilDigitizer = M_NULL; } if (src->MilSystem) { @@ -193,9 +193,9 @@ gst_matroxsrc_reset (GstMatroxSrc * src) src->MilSystem = M_NULL; } - if (src->MilDigitizer) { - MdigFree (src->MilDigitizer); - src->MilDigitizer = M_NULL; + if (src->MilApplication) { + MappFree (src->MilApplication); + src->MilApplication = M_NULL; } } @@ -377,7 +377,7 @@ gst_matroxsrc_start (GstBaseSrc * bsrc) } /* create Digitizer */ - MdigAlloc (src->MilSystem, M_DEFAULT, src->format, M_DEFAULT, + ret = MdigAlloc (src->MilSystem, M_DEFAULT, src->format, M_DEFAULT, &src->MilDigitizer); if (ret == M_NULL) { GST_ELEMENT_ERROR (src, RESOURCE, FAILED,