* [patch] ceph: add kfree() to error path
@ 2010-07-08 12:49 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2010-07-08 12:49 UTC (permalink / raw)
To: Sage Weil; +Cc: Noah Watkins, ceph-devel, kernel-janitors
We leak a "pi" on this error path.
Signed-off-by: Dan Carpenter <error27@gmail.com>
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);
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2010-07-08 12:49 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-08 12:49 [patch] ceph: add kfree() to error path Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox