summaryrefslogtreecommitdiffstats
path: root/xlators/features/trash/src/trash.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/features/trash/src/trash.c')
-rw-r--r--xlators/features/trash/src/trash.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/xlators/features/trash/src/trash.c b/xlators/features/trash/src/trash.c
index b2c4a9ab3..fa5d752ea 100644
--- a/xlators/features/trash/src/trash.c
+++ b/xlators/features/trash/src/trash.c
@@ -77,12 +77,16 @@ trash_common_unwind_cbk (call_frame_t *frame,
{
trash_local_t *local = frame->local;
+ if (!local)
+ goto out;
+
if (local->loc1.path)
loc_wipe (&local->loc1);
if (local->loc2.path)
loc_wipe (&local->loc2);
+ out:
STACK_UNWIND (frame, op_ret, op_errno);
return 0;
}
@@ -100,12 +104,16 @@ trash_common_unwind_buf_cbk (call_frame_t *frame,
{
trash_local_t *local = frame->local;
+ if (!local)
+ goto out;
+
if (local->loc1.path)
loc_wipe (&local->loc1);
if (local->loc2.path)
loc_wipe (&local->loc2);
+ out:
STACK_UNWIND (frame, op_ret, op_errno, buf);
return 0;
}