From: Soeren Apel Date: Thu, 16 Oct 2014 20:42:19 +0000 (+0200) Subject: scpi-pps: Populate sdi->serial_num and fix hw_info mem leak X-Git-Tag: libsigrok-0.4.0~845 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=d08667c53b52ff7015de883dfc45906323eb2aa5;p=libsigrok.git scpi-pps: Populate sdi->serial_num and fix hw_info mem leak --- diff --git a/src/hardware/scpi-pps/api.c b/src/hardware/scpi-pps/api.c index 891236a8..412d94ee 100644 --- a/src/hardware/scpi-pps/api.c +++ b/src/hardware/scpi-pps/api.c @@ -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;