X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fnorma-dmm%2Fapi.c;h=d155bc36d657b3b24f5f0817ae81caf5caa9e8b2;hb=9bf093011ae7692c4808d52f540b4be23b89ffcf;hp=094fe951cf165b671604f762fc31539176e75a58;hpb=ca314e060f653e6a0b5ec0f58914bac4d426217f;p=libsigrok.git diff --git a/src/hardware/norma-dmm/api.c b/src/hardware/norma-dmm/api.c index 094fe951..d155bc36 100644 --- a/src/hardware/norma-dmm/api.c +++ b/src/hardware/norma-dmm/api.c @@ -110,6 +110,7 @@ static GSList *scan(struct sr_dev_driver *drv, GSList *options) if (serial_write_blocking(serial, req, strlen(req), serial_timeout(serial, strlen(req))) < 0) { sr_err("Unable to send identification request."); + g_free(buf); return NULL; } len = BUF_MAX; @@ -159,8 +160,8 @@ static GSList *scan(struct sr_dev_driver *drv, GSList *options) return std_scan_complete(drv, devices); } -static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sdi, - const struct sr_channel_group *cg) +static int config_set(uint32_t key, GVariant *data, + const struct sr_dev_inst *sdi, const struct sr_channel_group *cg) { struct dev_context *devc; @@ -171,8 +172,8 @@ static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sd return sr_sw_limits_config_set(&devc->limits, key, data); } -static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi, - const struct sr_channel_group *cg) +static int config_list(uint32_t key, GVariant **data, + const struct sr_dev_inst *sdi, const struct sr_channel_group *cg) { return STD_CONFIG_LIST(key, data, sdi, cg, scanopts, drvopts, devopts); }