Diff between a163b8c0af00655f6c88638e88f49789721bcf8e and d8af57d80a2915ab1f52ff5f723d96d932dc8ac2
Changed Files
| File | Additions | Deletions | Status |
| tools/btproxy.c | +4 | -1 | modified |
Full Patch
diff --git a/tools/btproxy.c b/tools/btproxy.c
index 4429a16..9f409c3 100644
--- a/tools/btproxy.c
+++ b/tools/btproxy.c
@@ -330,8 +330,11 @@ static bool setup_proxy(int host_fd, bool host_shutdown,
struct proxy *proxy;
proxy = new0(struct proxy, 1);
- if (!proxy)
+ if (!proxy) {
+ close(host_fd);
+ close(dev_fd);
return NULL;
+ }
proxy->host_fd = host_fd;
proxy->host_shutdown = host_shutdown;