X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fhameg-hmo%2Fapi.c;h=89042da7a4b5adda5c399ed78ca0046f8c04508c;hb=cf398cc0589fe37589c7e6750cf6b735b77494df;hp=f8fc644cbb2c99b4667451a9998a87a1b85c3059;hpb=4889acefb2178f0c7f52ff9d97aa50d2b5607aa6;p=libsigrok.git diff --git a/src/hardware/hameg-hmo/api.c b/src/hardware/hameg-hmo/api.c index f8fc644c..89042da7 100644 --- a/src/hardware/hameg-hmo/api.c +++ b/src/hardware/hameg-hmo/api.c @@ -98,10 +98,8 @@ static struct sr_dev_inst *hmo_probe_serial_device(struct sr_scpi_dev_inst *scpi return sdi; fail: - if (hw_info) - sr_scpi_hw_info_free(hw_info); - if (sdi) - sr_dev_inst_free(sdi); + sr_scpi_hw_info_free(hw_info); + sr_dev_inst_free(sdi); g_free(devc); return NULL;