projects
/
GitHub
/
mt8127
/
android_kernel_alcatel_ttab.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ac07860
)
[S390] cio: avoid memory leak on error in css_alloc_subchannel().
author
Cornelia Huck
<cornelia.huck@de.ibm.com>
Fri, 10 Aug 2007 12:32:26 +0000
(14:32 +0200)
committer
Martin Schwidefsky
<schwidefsky@de.ibm.com>
Fri, 10 Aug 2007 12:32:36 +0000
(14:32 +0200)
sch->lock has been allocated in cio_validate_subchannel(), it must be
freed if cio_modify() fails.
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
drivers/s390/cio/css.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/s390/cio/css.c
b/drivers/s390/cio/css.c
index 1c27a5a06b4982d6f754484f52ad4187b8f9162d..5635e656c1a369b92bd0027c0e8beca261baed3c 100644
(file)
--- a/
drivers/s390/cio/css.c
+++ b/
drivers/s390/cio/css.c
@@
-79,6
+79,7
@@
css_alloc_subchannel(struct subchannel_id schid)
sch->schib.pmcw.intparm = (__u32)(unsigned long)sch;
ret = cio_modify(sch);
if (ret) {
+ kfree(sch->lock);
kfree(sch);
return ERR_PTR(ret);
}