Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 375277
b: refs/heads/master
c: 6366213
h: refs/heads/master
i:
  375275: d2d2cf6
v: v3
  • Loading branch information
David Woodhouse authored and David Woodhouse committed Mar 18, 2013
1 parent 1624b1f commit 00f9a89
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 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: fe9ab00f8354a4c388e30301859c5741590c3809
refs/heads/master: 63662139e519ce06090b2759cf4a1d291b9cc0e2
5 changes: 4 additions & 1 deletion trunk/kernel/params.c
Original file line number Diff line number Diff line change
Expand Up @@ -613,10 +613,13 @@ static __modinit int add_sysfs_param(struct module_kobject *mk,
sizeof(*mk->mp) + sizeof(mk->mp->attrs[0]) * (num+1),
GFP_KERNEL);
if (!new) {
kfree(mk->mp);
kfree(attrs);
err = -ENOMEM;
goto fail;
}
/* Despite looking like the typical realloc() bug, this is safe.
* We *want* the old 'attrs' to be freed either way, and we'll store
* the new one in the success case. */
attrs = krealloc(attrs, sizeof(new->grp.attrs[0])*(num+2), GFP_KERNEL);
if (!attrs) {
err = -ENOMEM;
Expand Down

0 comments on commit 00f9a89

Please sign in to comment.