Re: kobject_free_name() missing?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sunday 25 January 2004 12:55, Frank.A.Uepping@t-online.de wrote:
> Here is a sample session that demonstrates why:
>
> struct kobject kobj;
>
> kobject_init(&kobj);
>
> err = kobject_set_name(&kobj, "long trailer...");  // My be kmalloc'ed
> if (err)
>       return err;
>
> err = kobject_add(&kobj);
> if (err) {
>       kobject_free_name(&kobj);  // Not needed.

I think I can answer myself.
        kobject_put(&kobj);
has to be placed here.

>       return err;
> }

/FAU


--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux