]> sigrok.org Git - libsigrok.git/commit
device.c: Fix memory leak in sr_serial_dev_inst_free
authorAlexandru Gagniuc <redacted>
Thu, 20 Dec 2012 03:39:38 +0000 (21:39 -0600)
committerUwe Hermann <redacted>
Sun, 23 Dec 2012 16:18:14 +0000 (17:18 +0100)
commitacac8fc3500bc1f1e9e43c1508638488d91b2f86
tree7868e7a62902708af839da6193202750f6947bc5
parentd55c89f523e74a2f629bb23e8fd9bf6db7e3758a
device.c: Fix memory leak in sr_serial_dev_inst_free

sr_serial_dev_inst_free() freed all members of sr_serial_dev_inst, but did not
free the struct itself, as expected from a free_*() function. This inadvertently
caused a memory leak in every place sr_serial_dev_inst is used.

Free the struct itself

+ g_free(serial);

Signed-off-by: Alexandru Gagniuc <redacted>
device.c