MFC: r204008: realloc() with a proper amount of memory.

This commit is contained in:
Ruslan Ermilov 2010-02-22 15:58:10 +00:00
parent 27a5b388f3
commit 8d0a84b1d4
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/stable/8/; revision=204203

View File

@ -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);