提交 819d4eb1 编写于 作者: A Alexander Beregalov 提交者: Greg Kroah-Hartman

staging: ste_rmi4: fix memory leaks

Free resources before exit.
Signed-off-by: NAlexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 570edd3b
...@@ -764,8 +764,10 @@ static int synaptics_rmi4_i2c_query_device(struct synaptics_rmi4_data *pdata) ...@@ -764,8 +764,10 @@ static int synaptics_rmi4_i2c_query_device(struct synaptics_rmi4_data *pdata)
(pdata, rfi, (pdata, rfi,
&rmi_fd, &rmi_fd,
intr_count); intr_count);
if (retval < 0) if (retval < 0) {
kfree(rfi);
return retval; return retval;
}
} }
break; break;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册