Check vasprintf return value.
This commit is contained in:
parent
f5f87bf70f
commit
018d9cce80
|
@ -159,7 +159,8 @@ void gdb_outf(const char *fmt, ...)
|
|||
char *buf;
|
||||
|
||||
va_start(ap, fmt);
|
||||
vasprintf(&buf, fmt, ap);
|
||||
if (vasprintf(&buf, fmt, ap) < 0)
|
||||
return;
|
||||
gdb_out(buf);
|
||||
free(buf);
|
||||
va_end(ap);
|
||||
|
|
Loading…
Reference in New Issue