summaryrefslogtreecommitdiff
path: root/eio.c
diff options
context:
space:
mode:
authorroot <root>2011-06-20 07:28:14 +0000
committerroot <root>2011-06-20 07:28:14 +0000
commit7dc90eafe7ae0cc5ab67b58ef86b2fbd9b64f5d3 (patch)
tree01614e1ca7db3cea629c6dd20a8cf10efe0c467d /eio.c
parent12aa2cfa32f0275b0a6249330af90ea6b2d44d56 (diff)
*** empty log message ***
Diffstat (limited to 'eio.c')
-rw-r--r--eio.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/eio.c b/eio.c
index a191ed8..2ee77c7 100644
--- a/eio.c
+++ b/eio.c
@@ -1308,6 +1308,9 @@ eio__scandir (eio_req *req, etp_worker *self)
/* the corresponding closedir is in ETP_WORKER_CLEAR */
self->dirp = dirp = opendir (req->ptr1);
+ if (req->flags & EIO_FLAG_PTR1_FREE)
+ free (req->ptr1);
+
req->flags |= EIO_FLAG_PTR1_FREE | EIO_FLAG_PTR2_FREE;
req->ptr1 = dents = flags ? malloc (dentalloc * sizeof (eio_dirent)) : 0;
req->ptr2 = names = malloc (namesalloc);