Move free from SCPI_ResultError to SCPI_SystemErrorNextQ to correspond with SCPI_ErrorPop
| | |
| | | #include "scpi/constants.h" |
| | | #include "scpi/error.h" |
| | | #include "scpi/ieee488.h" |
| | | #include "utils_private.h" |
| | | |
| | | /** |
| | | * Command stub function |
| | |
| | | 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; |
| | | } |
| | | |
| | |
| | | } |
| | | result += writeData(context, "\"", 1); |
| | | |
| | | #if USE_DEVICE_DEPENDENT_ERROR_INFORMATION |
| | | SCPIDEFINE_free(&context->error_info_heap, error->device_dependent_info, false); |
| | | #endif |
| | | |
| | | return result; |
| | | } |
| | | |