Skip to content

Commit

Permalink
ceph: add kfree() to error path
Browse files Browse the repository at this point in the history
We leak a "pi" on this error path.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Sage Weil <sage@newdream.net>
  • Loading branch information
Dan Carpenter authored and Sage Weil committed Jul 8, 2010
1 parent 22b1de0 commit b0bbb0b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fs/ceph/osdmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit b0bbb0b

Please sign in to comment.