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/