Skip to content
This repository has been archived by the owner on May 4, 2018. It is now read-only.

Commit

Permalink
unix: fix readdir cleanup assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
bnoordhuis committed Sep 9, 2011
1 parent c4317f6 commit bd6066c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/unix/fs.c
Expand Up @@ -85,7 +85,8 @@ void uv_fs_req_cleanup(uv_fs_t* req) {

switch (req->fs_type) {
case UV_FS_READDIR:
assert(req->ptr);
assert((req->result == -1 && req->ptr == NULL)
|| (req->result >= 0 && req->ptr != NULL));
free(req->ptr);
req->ptr = NULL;
break;
Expand Down

0 comments on commit bd6066c

Please sign in to comment.