Re: kobject_free_name() missing?

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

 



On Sun, Jan 25, 2004 at 12:55:31PM +0100, Frank.A.Uepping@t-online.de wrote:
> Hi,
> I think this function is missing:
> 
> void kobject_free_name(struct kobject * kobj)
> {
> 	if (kobj->k_name && kobj->k_name != kobj->name)
> 		kfree(kobj->k_name);
> }

No, look in the code in kobject_cleanup().  When you call
kobject_set_name() it creates a buffer to hold the name (if it is
needed).  If that buffer has been created, it will be freed.

thanks,

greg k-h

--
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