Merge branch 'ba/object-info'

Leakfix.

* ba/object-info:
  protocol-caps.c: fix memory leak in send_info()
This commit is contained in:
Junio C Hamano 2021-09-10 11:46:26 -07:00
commit cd6a1fc8a2

View File

@ -69,9 +69,10 @@ static void send_info(struct repository *r, struct packet_writer *writer,
} }
} }
packet_writer_write(writer, "%s", packet_writer_write(writer, "%s", send_buffer.buf);
strbuf_detach(&send_buffer, NULL)); strbuf_reset(&send_buffer);
} }
strbuf_release(&send_buffer);
} }
int cap_object_info(struct repository *r, struct strvec *keys, int cap_object_info(struct repository *r, struct strvec *keys,