2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-09-04 16:25:31 +00:00

mem/shmem: Use xmalloc in collect_sysv_shmem

To get error message in log if no memory available.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Reviewed-by: Mike Rapoport <rppt@linux.ibm.com>
Signed-off-by: Andrei Vagin <avagin@gmail.com>
This commit is contained in:
Cyrill Gorcunov
2019-07-05 18:38:10 +03:00
committed by Andrei Vagin
parent 67d5dbb995
commit 92717977cd

View File

@@ -234,7 +234,7 @@ int collect_sysv_shmem(unsigned long shmid, unsigned long size)
* Tasks will not modify this object, so don't * Tasks will not modify this object, so don't
* shmalloc() as we do it for anon shared mem * shmalloc() as we do it for anon shared mem
*/ */
si = malloc(sizeof(*si)); si = xmalloc(sizeof(*si));
if (!si) if (!si)
return -1; return -1;