(log_realloc): increase len after realloc returns sucessfully

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@12841 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2003-09-17 23:56:14 +00:00
parent b6c1d10f6f
commit 6e10f776c4

View File

@@ -47,10 +47,10 @@ static struct facility*
log_realloc(krb5_log_facility *f)
{
struct facility *fp;
f->len++;
fp = realloc(f->val, f->len * sizeof(*f->val));
fp = realloc(f->val, (f->len + 1) * sizeof(*f->val));
if(fp == NULL)
return NULL;
f->len++;
f->val = fp;
fp += f->len - 1;
return fp;