Messages in this thread Patch in this message | | | Date | Thu, 4 Nov 2004 16:04:32 +0900 | From | Tejun Heo <> | Subject | Re: [PATCH 2.6.10-rc1 4/5] driver-model: kobject_add() error path reference counting fix |
| |
df_04_kobject_add_ref_fix.patch
In kobject_add(), @kobj wasn't put'd properly on error path. This patch fixes it.
Signed-off-by: Tejun Heo <tj@home-tj.org>
Index: linux-export/lib/kobject.c =================================================================== --- linux-export.orig/lib/kobject.c 2004-11-04 10:25:58.000000000 +0900 +++ linux-export/lib/kobject.c 2004-11-04 11:04:14.000000000 +0900 @@ -183,6 +183,7 @@ int kobject_add(struct kobject * kobj) unlink(kobj); if (parent) kobject_put(parent); + kobject_put(kobj); } else { kobject_hotplug(kobj, KOBJ_ADD); } - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |