Re: [RFC][PATCH v2 07/11] perf: x86, implementspmu::register_events

From: Cyrill Gorcunov
Date: Tue May 18 2010 - 14:44:08 EST


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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/