Skip to content

Commit

Permalink
Staging: hv: mousevsc: Free allocated memory in free_input_device()
Browse files Browse the repository at this point in the history
Free all allocated memory in free_input_device().

Signed-off-by: K. Y. Srinivasan <[email protected]>
Signed-off-by: Haiyang Zhang <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
kattisrinivasan authored and gregkh committed Oct 4, 2011
1 parent 61c4fb4 commit ea8646b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/staging/hv/hv_mouse.c
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,8 @@ static struct mousevsc_dev *alloc_input_device(struct hv_device *device)
static void free_input_device(struct mousevsc_dev *device)
{
WARN_ON(atomic_read(&device->ref_count) != 0);
kfree(device->hid_desc);
kfree(device->report_desc);
kfree(device);
}

Expand Down

0 comments on commit ea8646b

Please sign in to comment.