X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fhameg-hmo%2Fapi.c;h=7e062b8d6f258feb05989dc9571ec67e5298a665;hb=8bf18daabbf3cb0fec6c178b4bc7f6283a314e45;hp=8e15a20d6d21bf9276c5f9fbbcdb8d59323f0b12;hpb=7e463623382e1f574fde150b3fc88a65eaebb578;p=libsigrok.git diff --git a/src/hardware/hameg-hmo/api.c b/src/hardware/hameg-hmo/api.c index 8e15a20d..7e062b8d 100644 --- a/src/hardware/hameg-hmo/api.c +++ b/src/hardware/hameg-hmo/api.c @@ -120,13 +120,11 @@ static void clear_helper(void *priv) g_free(devc->analog_groups); g_free(devc->digital_groups); - - g_free(devc); } static int dev_clear(const struct sr_dev_driver *di) { - return std_dev_clear(di, clear_helper); + return std_dev_clear_with_callback(di, clear_helper); } static int dev_open(struct sr_dev_inst *sdi) @@ -142,11 +140,7 @@ static int dev_open(struct sr_dev_inst *sdi) static int dev_close(struct sr_dev_inst *sdi) { - sr_scpi_close(sdi->conn); - - sdi->status = SR_ST_INACTIVE; - - return SR_OK; + return sr_scpi_close(sdi->conn); } static int check_channel_group(struct dev_context *devc,