projects
/
GitHub
/
exynos8895
/
android_kernel_samsung_universal8895.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0787fdf
)
devtmpfs: unlock mutex in case of string allocation error
author
Kay Sievers
<kay.sievers@vrfy.org>
Tue, 22 Dec 2009 21:25:16 +0000
(22:25 +0100)
committer
Greg Kroah-Hartman
<gregkh@suse.de>
Wed, 23 Dec 2009 19:23:44 +0000
(11:23 -0800)
Reported-by: Kirill A. Shutemov <kirill@shutemov.name>
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/base/devtmpfs.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/base/devtmpfs.c
b/drivers/base/devtmpfs.c
index 278371c7bf5a414b8be388d73c262339df48130f..090dd4851301a802aed5b588f9dd7b49f8755158 100644
(file)
--- a/
drivers/base/devtmpfs.c
+++ b/
drivers/base/devtmpfs.c
@@
-101,8
+101,10
@@
static int create_path(const char *nodepath)
/* parent directories do not exist, create them */
path = kstrdup(nodepath, GFP_KERNEL);
- if (!path)
- return -ENOMEM;
+ if (!path) {
+ err = -ENOMEM;
+ goto out;
+ }
s = path;
for (;;) {
s = strchr(s, '/');
@@
-117,6
+119,7
@@
static int create_path(const char *nodepath)
}
kfree(path);
}
+out:
mutex_unlock(&dirlock);
return err;
}