diff options
Diffstat (limited to 'xlators/storage')
| -rw-r--r-- | xlators/storage/posix/src/posix.c | 5 | 
1 files changed, 3 insertions, 2 deletions
diff --git a/xlators/storage/posix/src/posix.c b/xlators/storage/posix/src/posix.c index e92f01cd6f2..9f4c42a1a31 100644 --- a/xlators/storage/posix/src/posix.c +++ b/xlators/storage/posix/src/posix.c @@ -1371,7 +1371,6 @@ posix_create (call_frame_t *frame, xlator_t *this,                  gf_log (this->name, GF_LOG_WARNING,                          "chown on %s failed: %s",  			real_path, strerror (op_errno)); -                goto out;          }  #endif @@ -1390,7 +1389,6 @@ posix_create (call_frame_t *frame, xlator_t *this,                  op_errno = errno;                  gf_log (this->name, GF_LOG_ERROR,                          "out of memory :("); -                close (_fd);                  goto out;          } @@ -1406,6 +1404,9 @@ posix_create (call_frame_t *frame, xlator_t *this,   out:          SET_TO_OLD_FS_ID (); +        if ((-1 == op_ret) && (_fd != -1)) +                close (_fd); +          frame->root->rsp_refs = NULL;          STACK_UNWIND (frame, op_ret, op_errno, fd, loc->inode, &stbuf);  | 
