提交 431ef7a2 编写于 作者: C Cyrill Gorcunov 提交者: Ingo Molnar

x86: debug Store - call kfree if only we really need it

We should call for kfree if only we really need it.
Though it's safe to call kfree with NULL pointer passed
in this code we've already tested the pointer and can
eliminate the call
Signed-off-by: NCyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: NIngo Molnar <mingo@elte.hu>
上级 19b4e7f4
......@@ -220,11 +220,11 @@ int ds_allocate(void **dsp, size_t bts_size_in_bytes)
int ds_free(void **dsp)
{
if (*dsp)
if (*dsp) {
kfree((void *)get_bts_buffer_base(*dsp));
kfree(*dsp);
*dsp = NULL;
kfree(*dsp);
*dsp = NULL;
}
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册