common: release uv_fs_scandir() array
uv__fs_scandir_cleanup() releases individual directory entries, but not the container array. This commit frees the array as well. Fixes: https://github.com/libuv/libuv/issues/873 PR-URL: https://github.com/libuv/libuv/pull/874 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
This commit is contained in:
parent
4fa89fbc61
commit
40e7a9867d
@ -503,6 +503,9 @@ void uv__fs_scandir_cleanup(uv_fs_t* req) {
|
||||
(*nbufs)--;
|
||||
for (; *nbufs < (unsigned int) req->result; (*nbufs)++)
|
||||
uv__fs_scandir_free(dents[*nbufs]);
|
||||
|
||||
uv__fs_scandir_free(req->ptr);
|
||||
req->ptr = NULL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user