diff mbox

ceph: add kfree() to error path

Message ID 20100708124938.GJ19184@bicker (mailing list archive)
State New, archived
Headers show

Commit Message

Dan Carpenter July 8, 2010, 12:49 p.m. UTC
None
diff mbox

Patch

diff --git a/fs/ceph/osdmap.c b/fs/ceph/osdmap.c
index 50ce64e..277f8b3 100644
--- a/fs/ceph/osdmap.c
+++ b/fs/ceph/osdmap.c
@@ -568,6 +568,7 @@  struct ceph_osdmap *osdmap_decode(void **p, void *end)
 		if (ev > CEPH_PG_POOL_VERSION) {
 			pr_warning("got unknown v %d > %d of ceph_pg_pool\n",
 				   ev, CEPH_PG_POOL_VERSION);
+			kfree(pi);
 			goto bad;
 		}
 		__decode_pool(p, pi);