projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
582c86e
)
ceph: Always free allocated memory in osdmap_decode()
author
Jesper Juhl
<jj@chaosbits.net>
Fri, 24 Dec 2010 22:01:12 +0000
(23:01 +0100)
committer
Sage Weil
<sage@newdream.net>
Wed, 12 Jan 2011 23:15:14 +0000
(15:15 -0800)
Always free memory allocated to 'pi' in
net/ceph/osdmap.c::osdmap_decode().
Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Sage Weil <sage@newdream.net>
net/ceph/osdmap.c
patch
|
blob
|
blame
|
history
diff --git
a/net/ceph/osdmap.c
b/net/ceph/osdmap.c
index d73f3f6efa36ff6cf9efc33cada1853afa8073e7..71603ac3dff54486cf1cdacaea142a3ecfc5f6fc 100644
(file)
--- a/
net/ceph/osdmap.c
+++ b/
net/ceph/osdmap.c
@@
-605,8
+605,10
@@
struct ceph_osdmap *osdmap_decode(void **p, void *end)
goto bad;
}
err = __decode_pool(p, end, pi);
- if (err < 0)
+ if (err < 0) {
+ kfree(pi);
goto bad;
+ }
__insert_pg_pool(&map->pg_pools, pi);
}