}
while (alloc < line->length);
- temp.text = xrealloc (temp.text, alloc);
+ free (temp.text);
+ temp.text = xmalloc (alloc);
}
memcpy (temp.text, line->text, line->length);
temp.length = line->length;
}
while ((savealloc *= 2) < smallest->length);
- saved.text = xrealloc (saved.text, savealloc);
+ free (saved.text);
+ saved.text = xmalloc (savealloc);
}
saved.length = smallest->length;
memcpy (saved.text, smallest->text, saved.length);
if (hostlen < strlen (host) + strlen (display) + 4)
{
hostlen = strlen (host) + strlen (display) + 4;
- hoststr = xrealloc (hoststr, hostlen);
+ free (hoststr);
+ hoststr = xmalloc (hostlen);
}
sprintf (hoststr, "(%s:%s)", host, display);
}
if (hostlen < strlen (host) + 3)
{
hostlen = strlen (host) + 3;
- hoststr = xrealloc (hoststr, hostlen);
+ free (hoststr);
+ hoststr = xmalloc (hostlen);
}
sprintf (hoststr, "(%s)", host);
}
if (hostlen < 1)
{
hostlen = 1;
- hoststr = xrealloc (hoststr, hostlen);
+ free (hoststr);
+ hoststr = xmalloc (hostlen);
}
*hoststr = '\0';
}