Skip to content

Commit

Permalink
radio_si470x: Fix free memory corruption
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Alan-Cox authored and torvalds committed Apr 24, 2009
1 parent 79e95eb commit ec5f5bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/media/radio/radio-si470x.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit ec5f5bf

Please sign in to comment.