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,
10081008 if (epoll_ctl (epfd , EPOLL_CTL_ADD , c -> tran_fd [0 ], & ev [n ]) < 0 )
10091009 {
10101010 fb_err ("err add poll %d" , c -> tran_fd [0 ]);
1011- return ;
1011+ goto epoll_close ;
10121012 }
10131013 }
10141014
10151015 if (ctx -> left > 0 )
10161016 {
10171017 if (epoll_wait (epfd , ev , nitems (ev ), ctx -> left ) <= 0 )
10181018 {
1019- return ;
1019+ goto epoll_close ;
10201020 }
10211021 }
10221022
@@ -1061,6 +1061,14 @@ static void fastboot_command_loop(FAR struct fastboot_ctx_s *ctx,
10611061 }
10621062 }
10631063 }
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 );
10641072}
10651073
10661074static void fastboot_publish (FAR struct fastboot_ctx_s * ctx ,
You can’t perform that action at this time.
0 commit comments