diff options
author | David S. Miller <davem@davemloft.net> | 2008-04-03 14:33:42 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-04-03 14:33:42 -0700 |
commit | 3bb5da3837cc1aa17736b05139c9a22c3794851a (patch) | |
tree | c92d5684a866542b1cb20641607ac1643ce03a47 /drivers/base/driver.c | |
parent | 7feb49c82a74bc7c091b8ab2a3f96baa33d08ece (diff) | |
parent | 9597362d354f8655ece324b01d0c640a0e99c077 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Diffstat (limited to 'drivers/base/driver.c')
-rw-r--r-- | drivers/base/driver.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/base/driver.c b/drivers/base/driver.c index bf31a0170a4..9a6537f1440 100644 --- a/drivers/base/driver.c +++ b/drivers/base/driver.c @@ -133,6 +133,7 @@ int driver_add_kobj(struct device_driver *drv, struct kobject *kobj, { va_list args; char *name; + int ret; va_start(args, fmt); name = kvasprintf(GFP_KERNEL, fmt, args); @@ -141,7 +142,9 @@ int driver_add_kobj(struct device_driver *drv, struct kobject *kobj, if (!name) return -ENOMEM; - return kobject_add(kobj, &drv->p->kobj, "%s", name); + ret = kobject_add(kobj, &drv->p->kobj, "%s", name); + kfree(name); + return ret; } EXPORT_SYMBOL_GPL(driver_add_kobj); |