Commit 0c682373 authored by Andrew Morton's avatar Andrew Morton Committed by Richard Henderson

[PATCH] misc fixes

- Fix error-path mem leak in __vfs_follow_link() (From a recent AC->2.4
  patch)

- Make drivers/net/aironet4500_proc.c:driver_lock static.
parent 2faf4338
......@@ -42,7 +42,7 @@
#define DEV_AWC_INFO 1
#define DEV_AWC 1
spinlock_t driver_lock = SPIN_LOCK_UNLOCKED;
static spinlock_t driver_lock = SPIN_LOCK_UNLOCKED;
struct awc_proc_private{
struct ctl_table_header * sysctl_header;
......
......@@ -2128,8 +2128,10 @@ __vfs_follow_link(struct nameidata *nd, const char *link)
* bloody create() on broken symlinks. Furrfu...
*/
name = __getname();
if (!name)
if (unlikely(!name)) {
path_release(nd);
return -ENOMEM;
}
strcpy(name, nd->last.name);
nd->last.name = name;
return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment