summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorSunny Kumar <sunkumar@redhat.com>2018-08-14 14:03:16 +0530
committerAmar Tumballi <amarts@redhat.com>2018-08-16 06:54:53 +0000
commit90b102fa0361523a706a25c85b56ee6f536f6277 (patch)
tree828715d93ee7aa459a2ff3cea4dbafb52d97927c /xlators
parent4bc20f6d3163933e49eb95cff698266e908133e1 (diff)
trash : fix coverity issues in trash.c
This patch fixes CID : 1382380 and 1382428. Change-Id: Ice3c8f5c2d97a0b541665bff744f32fbea9e294f updates: bz#789278 Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
Diffstat (limited to 'xlators')
-rw-r--r--xlators/features/trash/src/trash.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/xlators/features/trash/src/trash.c b/xlators/features/trash/src/trash.c
index e0bfcd9db43..a59b186add1 100644
--- a/xlators/features/trash/src/trash.c
+++ b/xlators/features/trash/src/trash.c
@@ -397,8 +397,11 @@ rename_trash_directory (xlator_t *this)
return 0;
out:
- frame->local = NULL;
- STACK_DESTROY (frame->root);
+ if (frame) {
+ frame->local = NULL;
+ STACK_DESTROY (frame->root);
+ }
+
trash_local_wipe (local);
return ret;
@@ -2427,7 +2430,7 @@ notify (xlator_t *this, int event, void *data, ...)
goto out;
if (priv->internal)
- ret = create_internalop_directory (this);
+ (void) create_internalop_directory (this);
}