Skip to contentSkip to conversation

ceph: Fix memory leak in chain_listxattr

PATCH RESEND Applied Li Wang 2 participants 2 messages Oct 30, 2013

lore
Share & tools
lore

Li Wang

author
#0 lore raw

PATCH RESEND 1/1 ceph: Fix memory leak in chain_listxattr

Free allocated memory before return

---
 src/os/chain_xattr.cc |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
src/os/chain_xattr.cc +1 -1
index 62733e3..52ae8db 100644
@@ -355,7 +355,7 @@ int chain_listxattr(const char *fn, char *names, size_t len) {
 
   r = sys_listxattr(fn, 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
Applied
#1 lore raw

Hi Li,

Applied both of these. THanks!

sage

Quoted 29 lines · Li Wang

Free allocated memory before return

---
 src/os/chain_xattr.cc |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
src/os/chain_xattr.cc +1 -1
index 62733e3..52ae8db 100644
@@ -355,7 +355,7 @@ int chain_listxattr(const char *fn, char *names, size_t len) {
 
   r = sys_listxattr(fn, full_buf, total_len);
   if (r < 0)
-    return r;
+    goto done;
 
   char *p = full_buf;
   const char *end = full_buf + r;
Signature · 6 lines
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html