From: Bert Vermeulen Date: Thu, 27 Mar 2014 14:13:24 +0000 (+0100) Subject: rigol-ds: Don't close SCPI handle we didn't open. X-Git-Tag: libsigrok-0.3.0~101 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=0bcfc9dcd83e3bf8200a268782fddad1f15f17a7;p=libsigrok.git rigol-ds: Don't close SCPI handle we didn't open. --- diff --git a/hardware/rigol-ds/api.c b/hardware/rigol-ds/api.c index b8dbe89f..4d49be0b 100644 --- a/hardware/rigol-ds/api.c +++ b/hardware/rigol-ds/api.c @@ -273,8 +273,6 @@ static struct sr_dev_inst *probe_device(struct sr_scpi_dev_inst *scpi) if (sr_scpi_get_hw_id(scpi, &hw_info) != SR_OK) { sr_info("Couldn't get IDN response."); - sr_scpi_close(scpi); - sr_scpi_free(scpi); return NULL; } @@ -292,13 +290,9 @@ static struct sr_dev_inst *probe_device(struct sr_scpi_dev_inst *scpi) model->name, hw_info->firmware_version))) { sr_scpi_hw_info_free(hw_info); - sr_scpi_close(scpi); - sr_scpi_free(scpi); return NULL; } - sr_scpi_close(scpi); - sdi->conn = scpi; sdi->driver = di;