Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 320276
b: refs/heads/master
c: ad3b904
h: refs/heads/master
v: v3
  • Loading branch information
Xi Wang authored and Alex Elder committed Jun 7, 2012
1 parent b9b666f commit 6953164
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 43643528cce60ca184fe8197efa8e8da7c89a037
refs/heads/master: ad3b904c07dfa88603689bf9a67bffbb9b99beb5
13 changes: 7 additions & 6 deletions trunk/net/ceph/osdmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -488,15 +488,16 @@ static int __decode_pool_names(void **p, void *end, struct ceph_osdmap *map)
ceph_decode_32_safe(p, end, pool, bad);
ceph_decode_32_safe(p, end, len, bad);
dout(" pool %d len %d\n", pool, len);
ceph_decode_need(p, end, len, bad);
pi = __lookup_pg_pool(&map->pg_pools, pool);
if (pi) {
char *name = kstrndup(*p, len, GFP_NOFS);

if (!name)
return -ENOMEM;
kfree(pi->name);
pi->name = kmalloc(len + 1, GFP_NOFS);
if (pi->name) {
memcpy(pi->name, *p, len);
pi->name[len] = '\0';
dout(" name is %s\n", pi->name);
}
pi->name = name;
dout(" name is %s\n", pi->name);
}
*p += len;
}
Expand Down

0 comments on commit 6953164

Please sign in to comment.