]> git.baikalelectronics.ru Git - kernel.git/commit
mailbox: mailbox-test: Prevent memory leak
authorLee Jones <lee.jones@linaro.org>
Wed, 23 Mar 2016 14:43:42 +0000 (14:43 +0000)
committerJassi Brar <jaswinder.singh@linaro.org>
Tue, 12 Apr 2016 07:58:30 +0000 (13:28 +0530)
commitfdfb92f545b8893dfa8359482f3f6ec4b9fd8634
treef9f90547b42c81aedfbab20531213dfde6e465e7
parent47d5aeba1349a2859611f2ba299ca9b122e32bcf
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: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
drivers/mailbox/mailbox-test.c