mirror of https://github.com/mkerrisk/man-pages
printf.3: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
5c1685bd3b
commit
6606f1d5f9
|
@ -1129,7 +1129,7 @@ make_message(const char *fmt, ...)
|
|||
if (size < 0)
|
||||
return NULL;
|
||||
|
||||
size++; /* For '\\0' */
|
||||
size++; /* For '\\0' */
|
||||
p = malloc(size);
|
||||
if (p == NULL)
|
||||
return NULL;
|
||||
|
@ -1137,8 +1137,8 @@ make_message(const char *fmt, ...)
|
|||
va_start(ap, fmt);
|
||||
size = vsnprintf(p, size, fmt, ap);
|
||||
if (size < 0) {
|
||||
free(p);
|
||||
return NULL;
|
||||
free(p);
|
||||
return NULL;
|
||||
}
|
||||
va_end(ap);
|
||||
|
||||
|
|
Loading…
Reference in New Issue