summaryrefslogtreecommitdiffstats
path: root/adb/fdevent.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'adb/fdevent.cpp')
-rw-r--r--adb/fdevent.cpp21
1 files changed, 10 insertions, 11 deletions
diff --git a/adb/fdevent.cpp b/adb/fdevent.cpp
index 45d33db..0c43c5e 100644
--- a/adb/fdevent.cpp
+++ b/adb/fdevent.cpp
@@ -15,25 +15,23 @@
** limitations under the License.
*/
-#include <sys/ioctl.h>
+#define TRACE_TAG TRACE_FDEVENT
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <unistd.h>
-#include <errno.h>
+#include "sysdeps.h"
+#include "fdevent.h"
+#include <errno.h>
#include <fcntl.h>
-
#include <stdarg.h>
#include <stddef.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/ioctl.h>
+#include <unistd.h>
#include "adb_io.h"
#include "adb_trace.h"
-#include "fdevent.h"
-#include "sysdeps.h"
-
-#define TRACE_TAG TRACE_FDEVENT
/* !!! Do not enable DEBUG for the adb that will run as the server:
** both stdout and stderr are used to communicate between the client
@@ -587,6 +585,7 @@ void fdevent_destroy(fdevent *fde)
FATAL("fde %p not created by fdevent_create()\n", fde);
}
fdevent_remove(fde);
+ free(fde);
}
void fdevent_install(fdevent *fde, int fd, fd_func func, void *arg)