From 90b102fa0361523a706a25c85b56ee6f536f6277 Mon Sep 17 00:00:00 2001 From: Sunny Kumar Date: Tue, 14 Aug 2018 14:03:16 +0530 Subject: 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 --- xlators/features/trash/src/trash.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'xlators/features/trash') 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); } -- cgit