This repository was archived by the owner on Apr 22, 2023. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1812,7 +1812,17 @@ eio__scandir (eio_req *req, etp_worker *self)
18121812#endif
18131813
18141814 if (req -> flags & EIO_FLAG_PTR1_FREE )
1815- free (req -> ptr1 );
1815+ {
1816+ req -> flags &= ~EIO_FLAG_PTR1_FREE ;
1817+ free (req -> ptr1 );
1818+ req -> ptr1 = NULL ;
1819+ }
1820+
1821+ if (!dirp )
1822+ {
1823+ req -> errorno = errno ;
1824+ return ;
1825+ }
18161826
18171827 req -> flags |= EIO_FLAG_PTR1_FREE | EIO_FLAG_PTR2_FREE ;
18181828 req -> ptr1 = dents = flags ? malloc (dentalloc * sizeof (eio_dirent )) : 0 ;
Original file line number Diff line number Diff line change @@ -123,6 +123,8 @@ static int uv__fs_after(eio_req* eio) {
123123 * callback. We must keep it until uv_fs_req_cleanup. If we get rid of
124124 * libeio this can be avoided.
125125 */
126+ if (req -> eio -> ptr2 == NULL )
127+ break ;
126128 buflen = 0 ;
127129 name = req -> eio -> ptr2 ;
128130 for (i = 0 ; i < req -> result ; i ++ ) {
Original file line number Diff line number Diff line change @@ -255,7 +255,7 @@ int uv_getaddrinfo(uv_loop_t* loop,
255255 goto error ;
256256 }
257257
258- uv_req_init (loop , (uv_req_t * ) handle );
258+ uv_req_init (loop , (uv_req_t * )handle );
259259
260260 handle -> getaddrinfo_cb = getaddrinfo_cb ;
261261 handle -> res = NULL ;
You can’t perform that action at this time.
0 commit comments