realloc() with a proper amount of memory.
MFC after: 3 days
This commit is contained in:
parent
27c9c97a3e
commit
f2ee2e68d2
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user