Commit 57e92500 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] emu10k1 memleak fix

From: Dipankar Sarma <dipankar@in.ibm.com>

Fix memory leak in emu10k1_audio_open.
parent ccb81d9c
......@@ -1187,7 +1187,8 @@ static int emu10k1_audio_open(struct inode *inode, struct file *file)
if ((woinst = (struct woinst *) kmalloc(sizeof(struct woinst), GFP_KERNEL)) == NULL) {
ERROR();
return -ENODEV;
kfree(wave_dev);
return -ENOMEM;
}
if (wave_dev->wiinst != NULL) {
......
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