diff options
-rw-r--r-- | xlators/performance/open-behind/src/open-behind.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/xlators/performance/open-behind/src/open-behind.c b/xlators/performance/open-behind/src/open-behind.c index 00e8906910a..d6dcf6fbc58 100644 --- a/xlators/performance/open-behind/src/open-behind.c +++ b/xlators/performance/open-behind/src/open-behind.c @@ -154,13 +154,16 @@ ob_wake_cbk (call_frame_t *frame, void *cookie, xlator_t *this, if (op_ret < 0) { /* mark fd BAD for ever */ ob_fd->op_errno = op_errno; + ob_fd = NULL; /*shouldn't be freed*/ } else { __fd_ctx_del (fd, this, NULL); - ob_fd_free (ob_fd); } } UNLOCK (&fd->lock); + if (ob_fd) + ob_fd_free (ob_fd); + list_for_each_entry_safe (stub, tmp, &list, list) { list_del_init (&stub->list); |