From fe9f464e77f0da218b809589751adca9e71f869c Mon Sep 17 00:00:00 2001 From: ru Date: Wed, 17 Feb 2010 16:45:03 +0000 Subject: realloc() with a proper amount of memory. MFC after: 3 days --- lib/libjail/jail.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/libjail/jail.c') diff --git a/lib/libjail/jail.c b/lib/libjail/jail.c index 39c88d0..c82cb11 100644 --- a/lib/libjail/jail.c +++ b/lib/libjail/jail.c @@ -191,7 +191,7 @@ jailparam_all(struct jailparam **jpp) /* Add the parameter to the list */ if (njp >= nlist) { nlist *= 2; - jp = realloc(jp, nlist * sizeof(jp)); + jp = realloc(jp, nlist * sizeof(*jp)); if (jp == NULL) { jailparam_free(jp, njp); return (-1); -- cgit v1.1