svn commit: r204008 - head/lib/libjail
Ruslan Ermilov
ru at FreeBSD.org
Wed Feb 17 16:45:04 UTC 2010
Author: ru
Date: Wed Feb 17 16:45:03 2010
New Revision: 204008
URL: http://svn.freebsd.org/changeset/base/204008
Log:
realloc() with a proper amount of memory.
MFC after: 3 days
Modified:
head/lib/libjail/jail.c
Modified: head/lib/libjail/jail.c
==============================================================================
--- head/lib/libjail/jail.c Wed Feb 17 15:44:01 2010 (r204007)
+++ head/lib/libjail/jail.c Wed Feb 17 16:45:03 2010 (r204008)
@@ -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);
More information about the svn-src-all
mailing list