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>
This commit is contained in:
Sunny Kumar 2018-08-14 14:03:16 +05:30 committed by Amar Tumballi
parent 4bc20f6d31
commit 90b102fa03

View File

@ -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);
}