realloc() with a proper amount of memory.

MFC after:	3 days
This commit is contained in:
Ruslan Ermilov 2010-02-17 16:45:03 +00:00
parent 27c9c97a3e
commit f2ee2e68d2
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=204008

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