X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=device.c;h=cf2fd8781dcdfeebd5a9d82daa04bc6599b0e5df;hb=c4650aca12630038fa034e2c0a2915073bdceedf;hp=29c721f0cc57529c22440a2fc1553dda3fcbf6d9;hpb=8f996b89481670219c7576e2c68b128a0a2ce026;p=libsigrok.git diff --git a/device.c b/device.c index 29c721f0..cf2fd878 100644 --- a/device.c +++ b/device.c @@ -244,6 +244,7 @@ SR_PRIV struct sr_dev_inst *sr_dev_inst_new(int index, int status, sdi->model = model ? g_strdup(model) : NULL; sdi->version = version ? g_strdup(version) : NULL; sdi->probes = NULL; + sdi->probe_groups = NULL; sdi->conn = NULL; sdi->priv = NULL; @@ -264,6 +265,9 @@ SR_PRIV void sr_dev_inst_free(struct sr_dev_inst *sdi) } g_slist_free(sdi->probes); + if (sdi->probe_groups) + g_slist_free(sdi->probe_groups); + g_free(sdi->vendor); g_free(sdi->model); g_free(sdi->version); @@ -298,6 +302,8 @@ SR_PRIV void sr_usb_dev_inst_free(struct sr_usb_dev_inst *usb) #endif +#ifdef HAVE_LIBSERIALPORT + /** * @private * @@ -345,6 +351,8 @@ SR_PRIV void sr_serial_dev_inst_free(struct sr_serial_dev_inst *serial) g_free(serial); } +#endif + /** * Get the list of devices/instances of the specified driver. *