Skip to content

Commit

Permalink
staging: ste_rmi4: fix memory leaks
Browse files Browse the repository at this point in the history
Free resources before exit.

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Alexander Beregalov authored and Greg Kroah-Hartman committed Mar 14, 2011
1 parent 570edd3 commit 819d4eb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c
Original file line number Diff line number Diff line change
Expand Up @@ -764,8 +764,10 @@ static int synaptics_rmi4_i2c_query_device(struct synaptics_rmi4_data *pdata)
(pdata, rfi,
&rmi_fd,
intr_count);
if (retval < 0)
if (retval < 0) {
kfree(rfi);
return retval;
}
}
break;
}
Expand Down

0 comments on commit 819d4eb

Please sign in to comment.