aboutsummaryrefslogtreecommitdiff
path: root/src/util/support/plugins.c
diff options
context:
space:
mode:
authorEzra Peisach <epeisach@mit.edu>2006-06-01 00:56:12 +0000
committerEzra Peisach <epeisach@mit.edu>2006-06-01 00:56:12 +0000
commit218cd01853820bc9bcd6700f0d3b98458eb7c8a9 (patch)
treeba538fe64e181648f15f83da21489ddaa528ff0d /src/util/support/plugins.c
parent246523a6906c8e5c744360f53721c83feb719581 (diff)
downloadkrb5-218cd01853820bc9bcd6700f0d3b98458eb7c8a9.zip
krb5-218cd01853820bc9bcd6700f0d3b98458eb7c8a9.tar.gz
krb5-218cd01853820bc9bcd6700f0d3b98458eb7c8a9.tar.bz2
krb5int_get_plugin_dir_data() uses + instead of * in realloc
In line 570, in reallocating the plugin tree - the memory allocated is (count + 1) + sizeof(*p) instead of (count +1 ) * sizeof(*p) Detected while running the krb5kdc under valgrind with memcheck. ticket: new tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18070 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/util/support/plugins.c')
-rw-r--r--src/util/support/plugins.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util/support/plugins.c b/src/util/support/plugins.c
index 0945d39..de659cb 100644
--- a/src/util/support/plugins.c
+++ b/src/util/support/plugins.c
@@ -567,7 +567,7 @@ krb5int_get_plugin_dir_data (struct plugin_dir_handle *dirhandle,
void **newp = NULL;
count++;
- newp = realloc (p, ((count + 1) + sizeof (*p))); /* +1 for NULL */
+ newp = realloc (p, ((count + 1) * sizeof (*p))); /* +1 for NULL */
if (newp == NULL) {
err = errno;
} else {