projects
/
platform
/
upstream
/
libusb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7ac0a40
)
Fix unlocked flying_transfers list access
author
Daniel Drake
<dsd@gentoo.org>
Sun, 27 Apr 2008 22:30:34 +0000
(23:30 +0100)
committer
Daniel Drake
<dsd@gentoo.org>
Tue, 29 Apr 2008 11:08:39 +0000
(12:08 +0100)
libusb/io.c
patch
|
blob
|
history
diff --git
a/libusb/io.c
b/libusb/io.c
index
1d3cdd3
..
9cea4df
100644
(file)
--- a/
libusb/io.c
+++ b/
libusb/io.c
@@
-633,8
+633,11
@@
static int submit_transfer(struct usbi_transfer *itransfer)
add_to_flying_list(itransfer);
r = usbi_backend->submit_transfer(itransfer);
- if (r < 0)
+ if (r < 0) {
+ pthread_mutex_lock(&flying_transfers_lock);
list_del(&itransfer->list);
+ pthread_mutex_unlock(&flying_transfers_lock);
+ }
return r;
}