projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0e27aa3
)
drivers/video/uvesafb.c: fix error-path memory leak
author
Andrew Morton
<
[email protected]
>
Mon, 28 Apr 2008 09:15:41 +0000
(
02:15
-0700)
committer
Linus Torvalds
<
[email protected]
>
Mon, 28 Apr 2008 15:58:41 +0000
(08:58 -0700)
Fix bug identified by Daniel Marjamki: `m' is leaked on the error path.
Addresses http://bugzilla.kernel.org/show_bug.cgi?id=10452
Cc: Daniel Marjamki <
[email protected]
>
Cc: "Antonino A. Daplas" <
[email protected]
>
Cc: "Randy.Dunlap" <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
drivers/video/uvesafb.c
patch
|
blob
|
history
diff --git
a/drivers/video/uvesafb.c
b/drivers/video/uvesafb.c
index c4f4d76163171d5b8111d282d576feddafee9c38..cdbb56edb6cbdde9b34231b5e985c70c3e39efb4 100644
(file)
--- a/
drivers/video/uvesafb.c
+++ b/
drivers/video/uvesafb.c
@@
-181,7
+181,8
@@
static int uvesafb_exec(struct uvesafb_ktask *task)
/* If all slots are taken -- bail out. */
if (uvfb_tasks[seq]) {
mutex_unlock(&uvfb_lock);
- return -EBUSY;
+ err = -EBUSY;
+ goto out;
}
/* Save a pointer to the kernel part of the task struct. */
@@
-205,7
+206,6
@@
static int uvesafb_exec(struct uvesafb_ktask *task)
err = cn_netlink_send(m, 0, gfp_any());
}
}
- kfree(m);
if (!err && !(task->t.flags & TF_EXIT))
err = !wait_for_completion_timeout(task->done,
@@
-218,7
+218,8
@@
static int uvesafb_exec(struct uvesafb_ktask *task)
seq++;
if (seq >= UVESAFB_TASKS_MAX)
seq = 0;
-
+out:
+ kfree(m);
return err;
}