projects
/
fw
/
stlink
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dbe5391
)
Fix memory leaks closing v1 hardware.
author
Karl Palsson
<karlp@tweak.net.au>
Mon, 14 Nov 2011 04:12:49 +0000
(
04:12
+0000)
committer
Karl Palsson
<karlp@tweak.net.au>
Mon, 14 Nov 2011 04:12:49 +0000
(
04:12
+0000)
Thanks valgrind
src/stlink-sg.c
patch
|
blob
|
history
diff --git
a/src/stlink-sg.c
b/src/stlink-sg.c
index b6ac4963bf7cf8b3ec1c3d8a19f6a9ab1894cc7b..062e83dbdbeb4bc2993fece091cf4f29fbd442d3 100644
(file)
--- a/
src/stlink-sg.c
+++ b/
src/stlink-sg.c
@@
-111,6
+111,8
@@
static void clear_cdb(struct stlink_libsg *sl) {
*/void _stlink_sg_close(stlink_t *sl) {
if (sl) {
struct stlink_libsg *slsg = sl->backend_data;
+ libusb_close(slsg->usb_handle);
+ libusb_exit(slsg->libusb_ctx);
free(slsg);
}
}