File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -1008,15 +1008,15 @@ static void fastboot_command_loop(FAR struct fastboot_ctx_s *ctx,
1008
1008
if (epoll_ctl (epfd , EPOLL_CTL_ADD , c -> tran_fd [0 ], & ev [n ]) < 0 )
1009
1009
{
1010
1010
fb_err ("err add poll %d" , c -> tran_fd [0 ]);
1011
- return ;
1011
+ goto epoll_close ;
1012
1012
}
1013
1013
}
1014
1014
1015
1015
if (ctx -> left > 0 )
1016
1016
{
1017
1017
if (epoll_wait (epfd , ev , nitems (ev ), ctx -> left ) <= 0 )
1018
1018
{
1019
- return ;
1019
+ goto epoll_close ;
1020
1020
}
1021
1021
}
1022
1022
@@ -1061,6 +1061,14 @@ static void fastboot_command_loop(FAR struct fastboot_ctx_s *ctx,
1061
1061
}
1062
1062
}
1063
1063
}
1064
+
1065
+ epoll_close :
1066
+ while (-- c >= ctx )
1067
+ {
1068
+ epoll_ctl (epfd , EPOLL_CTL_DEL , c -> tran_fd [0 ], NULL );
1069
+ }
1070
+
1071
+ close (epfd );
1064
1072
}
1065
1073
1066
1074
static void fastboot_publish (FAR struct fastboot_ctx_s * ctx ,
You can’t perform that action at this time.
0 commit comments