aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/ste_rmi4
diff options
context:
space:
mode:
authorAlexander Beregalov <a.beregalov@gmail.com>2011-03-13 18:58:50 (GMT)
committerGreg Kroah-Hartman <gregkh@suse.de>2011-03-14 19:22:54 (GMT)
commit819d4eb11605408e0267301d8853367ff82286a5 (patch)
tree753c9d8b841e90b4e1195d6d210ab14589e95d45 /drivers/staging/ste_rmi4
parent570edd3b2337a94b4159aa9ff10e0b96c5a69ec2 (diff)
staging: ste_rmi4: fix memory leaks
Free resources before exit. Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/ste_rmi4')
-rw-r--r--drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c b/drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c
index 51b4a79..d55a8e4 100644
--- a/drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c
+++ b/drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c
@@ -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;
}

Privacy Policy