diff options
author | Barak Sason <bsasonro@redhat.com> | 2019-08-18 15:36:40 +0300 |
---|---|---|
committer | Amar Tumballi <amarts@gmail.com> | 2019-08-20 16:42:06 +0000 |
commit | 72fe2bd9ae0ca223d8a320ca124c2837a1571d82 (patch) | |
tree | 2e484f761f5fb14af55b1d9b322d3a7bf89bb055 /api | |
parent | b4b683736367d93daad08a5ee6ca95778c07c5a4 (diff) |
api: fixing a coverity issue
Added a null pointer check to avoid seg-fault
CID:1403874
Updates: bz#789278
Change-Id: Ia8ff992c9f06d79647089f296afe77519fb5af2a
Signed-off-by: Barak Sason <bsasonro@redhat.com>
Diffstat (limited to 'api')
-rw-r--r-- | api/src/glfs-fops.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/api/src/glfs-fops.c b/api/src/glfs-fops.c index e6adea5ea9f..7d73e97822d 100644 --- a/api/src/glfs-fops.c +++ b/api/src/glfs-fops.c @@ -5924,8 +5924,10 @@ upcall_syncop_args_init(struct glfs *fs, struct gf_upcall *upcall_data) return args; out: if (ret) { - GF_FREE(args->upcall_data.client_uid); - GF_FREE(args); + if (args) { + GF_FREE(args->upcall_data.client_uid); + GF_FREE(args); + } } return NULL; |