lkml.org 
[lkml]   [2010]   [May]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC][PATCH v2 07/11] perf: x86, implements pmu::register_events
On Wed, May 19, 2010 at 01:48:27AM +0000, Lin Ming wrote:
...
> +static int register_event(struct pmu *pmu,
> + struct kobject *parent_kobj, char *name, u64 id)
> +{
> + struct perf_event_kobject *event_kobj;
> + struct attribute *attr;
> + int err;
> +
> + event_kobj = kzalloc(sizeof(*event_kobj), GFP_KERNEL);
> + if (!event_kobj) {
> + err = -ENOMEM;
> + goto exit;
> + }
> + event_kobj->id = id;
> +
> + err = kobject_init_and_add(&event_kobj->kobj,
> + &event_ktype, parent_kobj, name);
> + if (err)
> + goto exit;
> +
...

event_kobj seems to be not freed, right?

-- Cyrill


\
 
 \ /
  Last update: 2010-05-18 20:47    [W:0.021 / U:33.624 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site