All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ceph: fix potential double free
@ 2012-07-13 14:28 Alan Cox
  2012-07-13 14:36 ` Alex Elder
  0 siblings, 1 reply; 6+ messages in thread
From: Alan Cox @ 2012-07-13 14:28 UTC (permalink / raw)
  To: ceph-devel

From: Alan Cox <alan@linux.intel.com>

We re-run the loop but we don't re-set the attrs pointer back to NULL.

Signed-off-by: Alan Cox <alan@linux.intel.com>
---

 fs/ceph/xattr.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/ceph/xattr.c b/fs/ceph/xattr.c
index 785cb30..2c2ae5b 100644
--- a/fs/ceph/xattr.c
+++ b/fs/ceph/xattr.c
@@ -457,6 +457,7 @@ start:
 			for (i = 0; i < numattr; i++)
 				kfree(xattrs[i]);
 			kfree(xattrs);
+			xattrs = NULL;
 			goto start;
 		}
 		err = -EIO;


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-07-13 16:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-13 14:28 [PATCH] ceph: fix potential double free Alan Cox
2012-07-13 14:36 ` Alex Elder
2012-07-13 14:56   ` Alan Cox
2012-07-13 15:39     ` Alex Elder
2012-07-13 16:37       ` Alan Cox
2012-07-13 16:53         ` Alex Elder

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.