mirror of
https://github.com/nmap/nmap.git
synced 2026-08-04 06:40:48 +00:00
Be clear about not leaking realloc
This commit is contained in:
parent
b73ab0bfff
commit
073afa805d
1 changed files with 1 additions and 2 deletions
|
|
@ -158,8 +158,7 @@ const char *string_pool_sprintf(const char *fmt, ...)
|
|||
size = 32;
|
||||
/* Loop until we allocate a string big enough for the sprintf. */
|
||||
for (;;) {
|
||||
buf = (char *) realloc(buf, size);
|
||||
assert(buf != NULL);
|
||||
buf = (char *) safe_realloc(buf, size);
|
||||
va_start(ap, fmt);
|
||||
n = Vsnprintf(buf, size, fmt, ap);
|
||||
va_end(ap);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue