summaryrefslogtreecommitdiff
path: root/protocol-caps.c
diff options
context:
space:
mode:
Diffstat (limited to 'protocol-caps.c')
-rw-r--r--protocol-caps.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/protocol-caps.c b/protocol-caps.c
index 13a9e63a04..901b6795e4 100644
--- a/protocol-caps.c
+++ b/protocol-caps.c
@@ -69,9 +69,10 @@ static void send_info(struct repository *r, struct packet_writer *writer,
}
}
- packet_writer_write(writer, "%s",
- strbuf_detach(&send_buffer, NULL));
+ packet_writer_write(writer, "%s", send_buffer.buf);
+ strbuf_reset(&send_buffer);
}
+ strbuf_release(&send_buffer);
}
int cap_object_info(struct repository *r, struct strvec *keys,