Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 364913
b: refs/heads/master
c: 92edca0
h: refs/heads/master
i:
  364911: 8c5d257
v: v3
  • Loading branch information
Steven Rostedt authored and Steven Rostedt committed Mar 15, 2013
1 parent d9c84ee commit 8c9828e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 20 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: d1a291437f75f6c841819b7855d95a21958cc822
refs/heads/master: 92edca073c374f66b8eee20ec6426fb0cdb6c4d5
4 changes: 2 additions & 2 deletions trunk/kernel/trace/trace.h
Original file line number Diff line number Diff line change
Expand Up @@ -887,8 +887,8 @@ enum {

struct ftrace_event_field {
struct list_head link;
char *name;
char *type;
const char *name;
const char *type;
int filter_type;
int offset;
int size;
Expand Down
20 changes: 3 additions & 17 deletions trunk/kernel/trace/trace_events.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,8 @@ static int __trace_define_field(struct list_head *head, const char *type,
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->name = name;
field->type = type;

if (filter_type == FILTER_OTHER)
field->filter_type = filter_assign_type(type);
Expand All @@ -94,8 +89,6 @@ static int __trace_define_field(struct list_head *head, const char *type,
return 0;

err:
if (field)
kfree(field->name);
kmem_cache_free(field_cachep, field);

return -ENOMEM;
Expand Down Expand Up @@ -146,8 +139,6 @@ void trace_destroy_fields(struct ftrace_event_call *call)
head = trace_get_fields(call);
list_for_each_entry_safe(field, next, head, link) {
list_del(&field->link);
kfree(field->type);
kfree(field->name);
kmem_cache_free(field_cachep, field);
}
}
Expand Down Expand Up @@ -286,7 +277,6 @@ static void __put_system(struct event_subsystem *system)
kfree(filter->filter_string);
kfree(filter);
}
kfree(system->name);
kfree(system);
}

Expand Down Expand Up @@ -1202,10 +1192,7 @@ create_new_subsystem(const char *name)
return NULL;

system->ref_count = 1;
system->name = kstrdup(name, GFP_KERNEL);

if (!system->name)
goto out_free;
system->name = name;

system->filter = NULL;

Expand All @@ -1218,7 +1205,6 @@ create_new_subsystem(const char *name)
return system;

out_free:
kfree(system->name);
kfree(system);
return NULL;
}
Expand Down

0 comments on commit 8c9828e

Please sign in to comment.