forked from Minki/linux
radio_si470x: Fix free memory corruption
The release path for a disconnected device frees the object then unlocks the mutex in the freed object... Found by Dan Carpenter using Smatch Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
79e95eba02
commit
ec5f5bf805
@ -1200,7 +1200,7 @@ static int si470x_fops_release(struct file *file)
|
||||
video_unregister_device(radio->videodev);
|
||||
kfree(radio->buffer);
|
||||
kfree(radio);
|
||||
goto unlock;
|
||||
goto done;
|
||||
}
|
||||
|
||||
/* stop rds reception */
|
||||
|
Loading…
Reference in New Issue
Block a user