From f2ee2e68d2ba8087ec73bedb1be78a38fdb5f9c3 Mon Sep 17 00:00:00 2001 From: Ruslan Ermilov Date: Wed, 17 Feb 2010 16:45:03 +0000 Subject: [PATCH] realloc() with a proper amount of memory. MFC after: 3 days --- lib/libjail/jail.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libjail/jail.c b/lib/libjail/jail.c index 39c88d098edc..c82cb114641b 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);