On Thu, 29 Nov 2007, Kay Sievers wrote:Right. And even though cleaning up no longer needs to drop a reference to the kset, it still might need to free the kobject's name. So for example, either of these sequences: kobject_init(); kobject_set_name(); kobject_set_name(); kobject_init(); ... ... kobject_free(); kobject_free(); would leak memory. In fact, if we were designing the kobject API from scratch, I'd suggest making the ktype value an argument to kobject_init() so that it _couldn't_ be omitted. I don't understand the question. People _already_ expect the cleanup routine to free the kobject when the last reference is dropped. Why should there be any confusion over this? Alan Stern -
| H. Peter Anvin | Re: [rft] s2ram wakeup moves to .c, could fix few machines |
| Greg Kroah-Hartman | [PATCH 002/196] Chinese: rephrase English introduction in HOWTO |
| Ingo Molnar | [patch] PID namespace design bug, workaround |
| Tarkan Erimer | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
git: | |
| Eric Dumazet | Re: Multicast packet loss |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| David Miller | [GIT]: Networking |
| Jarek Poplawski | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
