linux-user: Use g_try_malloc() in do_msgrcv()
commit415d847110e3f8cd176160b92a5fdc56d8a20792
authorPeter Maydell <peter.maydell@linaro.org>
Fri, 20 May 2016 18:00:57 +0000 (20 19:00 +0100)
committerRiku Voipio <riku.voipio@linaro.org>
Fri, 27 May 2016 11:50:39 +0000 (27 14:50 +0300)
tree863bda57c9db1d342ff1812e348464549e3e76bf
parent99874f65526ed7827202c6e17c62f30d47652bdd
linux-user: Use g_try_malloc() in do_msgrcv()

In do_msgrcv() we want to allocate a message buffer, whose size
is passed to us by the guest. That means we could legitimately
fail, so use g_try_malloc() and handle the error case, in the same
way that do_msgsnd() does.

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