From 5639193139792b48665b9c5d7d7ca165af124be6 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 25 Nov 2016 18:58:31 +0100 Subject: [PATCH] nspawn: use realloc_multiply() where it makes sense --- src/nspawn/nspawn-mount.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nspawn/nspawn-mount.c b/src/nspawn/nspawn-mount.c index d72b0a0..9d76f4a 100644 --- a/src/nspawn/nspawn-mount.c +++ b/src/nspawn/nspawn-mount.c @@ -47,7 +47,7 @@ CustomMount* custom_mount_add(CustomMount **l, unsigned *n, CustomMountType t) { assert(t >= 0); assert(t < _CUSTOM_MOUNT_TYPE_MAX); - c = realloc(*l, (*n + 1) * sizeof(CustomMount)); + c = realloc_multiply(*l, (*n + 1), sizeof(CustomMount)); if (!c) return NULL; -- 2.7.4