From fdce1ea4431cfc32b7015dd1fe1b71b548d26023 Mon Sep 17 00:00:00 2001 From: Jan Breuer <jan.breuer@jaybee.cz> Date: 周日, 24 4月 2016 21:30:36 +0800 Subject: [PATCH] Move free from SCPI_ResultError to SCPI_SystemErrorNextQ to correspond with SCPI_ErrorPop --- libscpi/src/minimal.c | 4 ++++ libscpi/src/parser.c | 4 ---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libscpi/src/minimal.c b/libscpi/src/minimal.c index 630f55d..83ecec7 100644 --- a/libscpi/src/minimal.c +++ b/libscpi/src/minimal.c @@ -40,6 +40,7 @@ #include "scpi/constants.h" #include "scpi/error.h" #include "scpi/ieee488.h" +#include "utils_private.h" /** * Command stub function @@ -80,6 +81,9 @@ scpi_error_t error; SCPI_ErrorPop(context, &error); SCPI_ResultError(context, &error); +#if USE_DEVICE_DEPENDENT_ERROR_INFORMATION + SCPIDEFINE_free(&context->error_info_heap, error.device_dependent_info, false); +#endif return SCPI_RES_OK; } diff --git a/libscpi/src/parser.c b/libscpi/src/parser.c index af37b01..db6f5df 100644 --- a/libscpi/src/parser.c +++ b/libscpi/src/parser.c @@ -593,10 +593,6 @@ } result += writeData(context, "\"", 1); -#if USE_DEVICE_DEPENDENT_ERROR_INFORMATION - SCPIDEFINE_free(&context->error_info_heap, error->device_dependent_info, false); -#endif - return result; } -- Gitblit v1.9.1