Merge branch 'ma/pkt-line-leakfix' into maint
A leakfix. * ma/pkt-line-leakfix: pkt-line: re-'static'-ify buffer in packet_write_fmt_1()
This commit is contained in:
commit
6da2d14c8b
@ -136,9 +136,10 @@ static void format_packet(struct strbuf *out, const char *fmt, va_list args)
|
|||||||
static int packet_write_fmt_1(int fd, int gently,
|
static int packet_write_fmt_1(int fd, int gently,
|
||||||
const char *fmt, va_list args)
|
const char *fmt, va_list args)
|
||||||
{
|
{
|
||||||
struct strbuf buf = STRBUF_INIT;
|
static struct strbuf buf = STRBUF_INIT;
|
||||||
ssize_t count;
|
ssize_t count;
|
||||||
|
|
||||||
|
strbuf_reset(&buf);
|
||||||
format_packet(&buf, fmt, args);
|
format_packet(&buf, fmt, args);
|
||||||
count = write_in_full(fd, buf.buf, buf.len);
|
count = write_in_full(fd, buf.buf, buf.len);
|
||||||
if (count == buf.len)
|
if (count == buf.len)
|
||||||
|
Loading…
Reference in New Issue
Block a user