2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-30 05:48:05 +00:00

criu: lazy-pages: take care of possible NULL pointer dereference

Fix CID 163485 (#2 of 2): Dereference null return value (NULL_RETURNS)
7. dereference: Dereferencing a pointer that might be null dest when
calling handle_user_fault.

Signed-off-by: Mike Rapoport <rppt@linux.vnet.ibm.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
This commit is contained in:
Mike Rapoport 2016-06-16 08:06:00 +03:00 committed by Andrei Vagin
parent b6cad30524
commit 6f7f11e3b3

View File

@ -731,6 +731,7 @@ static int handle_requests(int epollfd, struct epoll_event *events)
for (i = 0; i < ret; i++) {
lpi = uffd_to_lpi(events[i].data.fd);
BUG_ON(!lpi);
ret = handle_user_fault(lpi, dest);
if (ret < 0)
goto out;