From: Martin Ling Date: Sat, 7 Dec 2013 17:54:33 +0000 (+0000) Subject: rigol-ds: close SCPI device after using for scan. X-Git-Tag: libsigrok-0.3.0~463 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=b4936bae0a4b2e8527324416faf81704e53216d2;p=libsigrok.git rigol-ds: close SCPI device after using for scan. --- diff --git a/hardware/rigol-ds/api.c b/hardware/rigol-ds/api.c index 8af03eb6..6b92fa8d 100644 --- a/hardware/rigol-ds/api.c +++ b/hardware/rigol-ds/api.c @@ -279,6 +279,7 @@ static int probe_port(const char *resource, const char *serialcomm, GSList **dev if (strcasecmp(hw_info->manufacturer, "Rigol Technologies")) { sr_scpi_hw_info_free(hw_info); + sr_scpi_close(scpi); sr_scpi_free(scpi); return SR_ERR_NA; } @@ -294,11 +295,13 @@ static int probe_port(const char *resource, const char *serialcomm, GSList **dev hw_info->manufacturer, hw_info->model, hw_info->firmware_version))) { sr_scpi_hw_info_free(hw_info); + sr_scpi_close(scpi); sr_scpi_free(scpi); return SR_ERR_NA; } sr_scpi_hw_info_free(hw_info); + sr_scpi_close(scpi); sdi->conn = scpi;