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>
This commit is contained in:
parent
570edd3b23
commit
819d4eb116
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue