From 899b2170945c6023b0037fed70b19aa3cc680a22 Mon Sep 17 00:00:00 2001 From: Amar Tumballi Date: Fri, 17 May 2019 11:04:45 +0530 Subject: across: coverity fixes * locks/posix.c: key was not freed in one of the cases. * locks/common.c: lock was being free'd out of context. * nfs/exports: handle case of missing free. * protocol/client: handle case of entry not freed. * storage/posix: handle possible case of double free CID: 1398628, 1400731, 1400732, 1400756, 1124796, 1325526 updates: bz#789278 Change-Id: Ieeaca890288bc4686355f6565f853dc8911344e8 Signed-off-by: Amar Tumballi Signed-off-by: Sheetal Pamecha --- xlators/protocol/client/src/client-helpers.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'xlators/protocol') diff --git a/xlators/protocol/client/src/client-helpers.c b/xlators/protocol/client/src/client-helpers.c index 5873d67b486..52e1089900b 100644 --- a/xlators/protocol/client/src/client-helpers.c +++ b/xlators/protocol/client/src/client-helpers.c @@ -232,12 +232,15 @@ unserialize_rsp_direntp(xlator_t *this, fd_t *fd, struct gfs3_readdirp_rsp *rsp, list_add_tail(&entry->list, &entries->list); trav = trav->nextentry; + entry = NULL; } ret = 0; out: if (buf) GF_FREE(buf); + if (entry) + gf_dirent_entry_free(entry); return ret; } -- cgit