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;
|
char *buf;
|
||||||
|
|
||||||
va_start(ap, fmt);
|
va_start(ap, fmt);
|
||||||
vasprintf(&buf, fmt, ap);
|
if (vasprintf(&buf, fmt, ap) < 0)
|
||||||
|
return;
|
||||||
gdb_out(buf);
|
gdb_out(buf);
|
||||||
free(buf);
|
free(buf);
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
|
|
Loading…
Reference in New Issue