ceph: Fix memory leak in chain_flistxattr()
PATCH 1/1 ceph: Fix memory leak in chain_flistxattr()
Free allocated memory before return
Signed-off-by Li Wang <[email protected]>
--- src/os/chain_xattr.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
src/os/chain_xattr.cc +1 -1
@@ -401,7 +401,7 @@ int chain_flistxattr(int fd, char *names, size_t len) { r = sys_flistxattr(fd, full_buf, total_len); if (r < 0) - return r; + goto done; char *p = full_buf; const char *end = full_buf + r;
Signature · 1 line
1.7.9.5