mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-30 23:52:49 +00:00
realloc() with a proper amount of memory.
MFC after: 3 days
This commit is contained in:
parent
27c9c97a3e
commit
f2ee2e68d2
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=204008
@ -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…
Reference in New Issue
Block a user