[CRIU] [PATCH 15/16] mem/shmem: Use xmalloc in collect_sysv_shmem
Mike Rapoport
rppt at linux.ibm.com
Mon Jul 8 20:10:01 MSK 2019
On Fri, Jul 05, 2019 at 06:38:10PM +0300, Cyrill Gorcunov wrote:
> To get error message in log if no memory available.
>
> Signed-off-by: Cyrill Gorcunov <gorcunov at gmail.com>
Reviewed-by: Mike Rapoport <rppt at linux.ibm.com>
> ---
> criu/shmem.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/criu/shmem.c b/criu/shmem.c
> index 478d67a69992..1ca1b89320d2 100644
> --- a/criu/shmem.c
> +++ b/criu/shmem.c
> @@ -234,7 +234,7 @@ int collect_sysv_shmem(unsigned long shmid, unsigned long size)
> * Tasks will not modify this object, so don't
> * shmalloc() as we do it for anon shared mem
> */
> - si = malloc(sizeof(*si));
> + si = xmalloc(sizeof(*si));
> if (!si)
> return -1;
>
> --
> 2.20.1
>
> _______________________________________________
> CRIU mailing list
> CRIU at openvz.org
> https://lists.openvz.org/mailman/listinfo/criu
>
--
Sincerely yours,
Mike.
More information about the CRIU
mailing list