(rk_strpoolprintf): remove debug printf, plug memory leak

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15986 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2005-08-25 14:59:06 +00:00
parent a650750eeb
commit 229b381adc

View File

@@ -81,19 +81,18 @@ rk_strpoolprintf(struct rk_strpool *p, const char *fmt, ...)
len = vasprintf(&str, fmt, ap);
va_end(ap);
if (str == NULL) {
printf("vasprintf");
rk_strpoolfree(p);
return NULL;
}
str2 = realloc(p->str, len + p->len + 1);
if (str2 == NULL) {
printf("realloc");
rk_strpoolfree(p);
return NULL;
}
p->str = str2;
memcpy(p->str + p->len, str, len + 1);
p->len += len;
free(str);
return p;
}