linux-user: Fix error handling in target_to_host_semarray()
authorPeter Maydell <peter.maydell@linaro.org>
Mon, 17 Feb 2014 18:55:34 +0000 (18:55 +0000)
committerRiku Voipio <riku.voipio@linaro.org>
Wed, 19 Feb 2014 10:29:23 +0000 (12:29 +0200)
commit69d4c703a549f0630793a67b16a8fc6bc14c8654
tree4a2a94e97938666365eef461fb19f043f5f1fdc5
parentfff8c539bd69dce14c63827111e9d74e6b961317
linux-user: Fix error handling in target_to_host_semarray()

Fix two issues in error handling in target_to_host_semarray():
 * don't leak the host_array buffer if lock_user fails
 * return an error if malloc() fails

v2: added missing * -Riku Voipio

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
linux-user/syscall.c