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:
8aceb5c
)
Fix a usbi_pollfd leak in error path
author
Daniel Drake
<dan@reactivated.net>
Wed, 19 May 2010 20:37:29 +0000
(17:37 -0300)
committer
Daniel Drake
<dan@reactivated.net>
Wed, 19 May 2010 20:37:29 +0000
(17:37 -0300)
I accidently missed this when applying Pete Batard's earlier patch.
Pointed out by Michael Plante.
libusb/io.c
patch
|
blob
|
history
diff --git
a/libusb/io.c
b/libusb/io.c
index 6ea816c9afa8978d9fba87ec82515cdce84178f3..c7bfeb56df8aabe961ed47fd0434d7d4a5ece7f9 100644
(file)
--- a/
libusb/io.c
+++ b/
libusb/io.c
@@
-1031,6
+1031,7
@@
int usbi_io_init(struct libusb_context *ctx)
usbi_dbg("using timerfd for timeouts");
r = usbi_add_pollfd(ctx, ctx->timerfd, POLLIN);
if (r < 0) {
+ usbi_remove_pollfd(ctx, ctx->ctrl_pipe[0]);
close(ctx->timerfd);
goto err_close_pipe;
}