adb: convert fdevent over to unique_fd.
This adds fdsan deallocation sanitization to all fds monitored by
fdevent, which is most of the ones in adb.
Bug: http://b/79786774
Test: python test_device.py
Change-Id: I465804fdb0fd0ac019445900a30ba3403f5bf711
diff --git a/adb/fdevent.h b/adb/fdevent.h
index 9c6e069..69c4072 100644
--- a/adb/fdevent.h
+++ b/adb/fdevent.h
@@ -22,6 +22,8 @@
#include <functional>
+#include "adb_unique_fd.h"
+
/* events that may be observed */
#define FDE_READ 0x0001
#define FDE_WRITE 0x0002
@@ -33,7 +35,7 @@
fdevent* next = nullptr;
fdevent* prev = nullptr;
- int fd = -1;
+ unique_fd fd;
int force_eof = 0;
uint16_t state = 0;