mailbox: mailbox-test: Prevent memory leak
If we set the Signal twice or more, without using it as part of a message, memory will be re-allocated and the pointer over-written. Prevent this potential leak by only allocating memory when there isn't any already. Reported-by: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NLee Jones <lee.jones@linaro.org> Signed-off-by: NJassi Brar <jaswinder.singh@linaro.org>
Showing
想要评论请 注册 或 登录