Re: [patch 6/6] statistics infrastructure - exploitation: zfcp

Martin Peschke
2005-12-14T16:56:13Z

Matthew Wilcox wrote:
> On Wed, Dec 14, 2005 at 05:14:30PM +0100, Martin Peschke wrote:
>
>> if (device_register(&unit->sysfs_device)) {
>>+ zfcp_unit_statistic_unregister(unit);
>> kfree(unit);
>> return NULL;
>> }
>>
>> if (zfcp_sysfs_unit_create_files(&unit->sysfs_device)) {
>>+ zfcp_unit_statistic_unregister(unit);
>> device_unregister(&unit->sysfs_device);
>> return NULL;
>> }
>
>
> Unrelated, but doesn't that error path forget to release unit?
>
>

correct, I guess ... Andreas, could you fix this?