aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <f4bug@amsat.org>2017-07-26 23:42:17 -0300
committerMichael Tokarev <mjt@tls.msk.ru>2017-07-31 13:06:39 +0300
commitbc658e4a2e81593f75a3ae34b112be77efbb3e0a (patch)
treee323cb5b224b593aa537d2a5493da299be2a11f0
parent72cd500b725fd9a3bbefeb468d54c192fdc28318 (diff)
syscall: fix dereference of undefined pointer
linux-user/syscall.c:5581:9: warning: Dereference of undefined pointer value if (*host_rt_dev_ptr != 0) { ^~~~~~~~~~~~~~~~ Reported-by: Clang Static Analyzer Suggested-by: Laurent Vivier <lvivier@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Laurent Vivier <laurent@vivier.eu> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
-rw-r--r--linux-user/syscall.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 003943b736..71d45a9963 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -5573,6 +5573,7 @@ static abi_long do_ioctl_rt(const IOCTLEntry *ie, uint8_t *buf_temp,
field_types, THUNK_HOST);
}
unlock_user(argptr, arg, 0);
+ assert(host_rt_dev_ptr);
ret = get_errno(safe_ioctl(fd, ie->host_cmd, buf_temp));
if (*host_rt_dev_ptr != 0) {