]> sigrok.org Git - libsigrok.git/commitdiff
scpi-pps: Populate sdi->serial_num and fix hw_info mem leak
authorSoeren Apel <redacted>
Thu, 16 Oct 2014 20:42:19 +0000 (22:42 +0200)
committerBert Vermeulen <redacted>
Fri, 17 Oct 2014 01:02:52 +0000 (03:02 +0200)
src/hardware/scpi-pps/api.c

index 891236a81c655d7283159b167c502e79f34c5e16..412d94eef271f442624ec1a25ee90d5b84321de0 100644 (file)
@@ -88,6 +88,11 @@ static struct sr_dev_inst *probe_device(struct sr_scpi_dev_inst *scpi)
        sdi->conn = scpi;
        sdi->driver = di;
        sdi->inst_type = SR_INST_SCPI;
+       sdi->serial_num = g_strdup(hw_info->serial_number);
+
+       sr_scpi_hw_info_free(hw_info);
+       hw_info = NULL;
+
        devc = g_malloc0(sizeof(struct dev_context));
        devc->device = device;
        sdi->priv = devc;