From dac319680757437ca23f9525bcdbe8f6f2544fbf Mon Sep 17 00:00:00 2001 From: "Schroeder, Timo (cloud)" Date: Wed, 25 Aug 2021 11:03:24 +0200 Subject: [PATCH] Fix: mdsmisc GetXYSignalXd() invalid free xd on error --- mdsmisc/ScopeUtilities.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mdsmisc/ScopeUtilities.c b/mdsmisc/ScopeUtilities.c index 74354fc9e4..f5c8cd9a93 100644 --- a/mdsmisc/ScopeUtilities.c +++ b/mdsmisc/ScopeUtilities.c @@ -886,6 +886,9 @@ EXPORT int GetXYSignalXd(mdsdsc_t *const inY, mdsdsc_t *const inX, return TdiNULL_PTR; EMPTYXD(yXd); EMPTYXD(xXd); + EMPTYXD(title); + EMPTYXD(xLabel); + EMPTYXD(yLabel); int estimatedSegmentSamples = 0; int isLong = FALSE; double xmin = -INFINITY, xmax = INFINITY; // requested @@ -936,9 +939,6 @@ EXPORT int GetXYSignalXd(mdsdsc_t *const inY, mdsdsc_t *const inX, if (STATUS_NOT_OK) goto return_err; // Get Y, title, and yLabel, if any - EMPTYXD(title); - EMPTYXD(xLabel); - EMPTYXD(yLabel); recGetHelp(yXd.pointer, &title); recGetUnits(yXd.pointer, &yLabel); // Get X