summaryrefslogtreecommitdiffstats
path: root/xlators/features/sdfs/src/sdfs.c
diff options
context:
space:
mode:
authorAmar Tumballi <amarts@redhat.com>2019-05-20 11:11:39 +0530
committerAmar Tumballi <amarts@redhat.com>2019-06-04 10:30:29 +0000
commite7aeab3063ac5645136303278b477d7de35266c0 (patch)
tree73ab2e1ea4e26b1019318178d114c3d89dc34301 /xlators/features/sdfs/src/sdfs.c
parentabc4d4cfa01d922c46ebb1abfa5d801ba8c6b5c8 (diff)
across: clang-scan: fix NULL dereferencing warnings
All these checks are done after analyzing clang-scan report produced by the CI job @ https://build.gluster.org/job/clang-scan updates: bz#1622665 Change-Id: I590305af4ceb779be952974b2a36066ffc4865ca Signed-off-by: Amar Tumballi <amarts@redhat.com>
Diffstat (limited to 'xlators/features/sdfs/src/sdfs.c')
-rw-r--r--xlators/features/sdfs/src/sdfs.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/xlators/features/sdfs/src/sdfs.c b/xlators/features/sdfs/src/sdfs.c
index b3fbc01caf7..3460b475824 100644
--- a/xlators/features/sdfs/src/sdfs.c
+++ b/xlators/features/sdfs/src/sdfs.c
@@ -177,9 +177,10 @@ sdfs_get_new_frame(call_frame_t *frame, loc_t *loc, call_frame_t **new_frame)
ret = 0;
err:
- if ((ret < 0) && (*new_frame != NULL)) {
+ if (ret && (*new_frame)) {
SDFS_STACK_DESTROY((*new_frame));
*new_frame = NULL;
+ ret = -1;
}
return ret;