Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 141012
b: refs/heads/master
c: fe9f57f
h: refs/heads/master
v: v3
  • Loading branch information
Ingo Molnar committed Mar 22, 2009
1 parent 719076d commit 5ba50ef
Show file tree
Hide file tree
Showing 2 changed files with 7 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: cfb180f3e71b2a280a254c8646a9ab1beab63f84
refs/heads/master: fe9f57f250ab4d781b99504caeb218ca2db14c1a
7 changes: 6 additions & 1 deletion trunk/kernel/trace/trace_events.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,26 +24,31 @@ int trace_define_field(struct ftrace_event_call *call, char *type,
{
struct ftrace_event_field *field;

field = kmalloc(sizeof(*field), GFP_KERNEL);
field = kzalloc(sizeof(*field), GFP_KERNEL);
if (!field)
goto err;

field->name = kstrdup(name, GFP_KERNEL);
if (!field->name)
goto err;

field->type = kstrdup(type, GFP_KERNEL);
if (!field->type)
goto err;

field->offset = offset;
field->size = size;
list_add(&field->link, &call->fields);

return 0;

err:
if (field) {
kfree(field->name);
kfree(field->type);
}
kfree(field);

return -ENOMEM;
}

Expand Down

0 comments on commit 5ba50ef

Please sign in to comment.