summaryrefslogtreecommitdiff
path: root/testing/irc_syncbot.c
diff options
context:
space:
mode:
Diffstat (limited to 'testing/irc_syncbot.c')
-rw-r--r--testing/irc_syncbot.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/testing/irc_syncbot.c b/testing/irc_syncbot.c
index f122094f..83b86a19 100644
--- a/testing/irc_syncbot.c
+++ b/testing/irc_syncbot.c
@@ -300,8 +300,7 @@ int main(int argc, char *argv[])
300 if (count > 0) { 300 if (count > 0) {
301 last_get = get_monotime_sec(); 301 last_get = get_monotime_sec();
302 ping_sent = 0; 302 ping_sent = 0;
303 VLA(uint8_t, data, count + 1); 303 uint8_t *data = (uint8_t *)calloc(count + 1, 1);
304 data[count] = 0;
305 recv(sock, data, count, MSG_NOSIGNAL); 304 recv(sock, data, count, MSG_NOSIGNAL);
306 printf("%s", data); 305 printf("%s", data);
307 306
@@ -345,6 +344,8 @@ int main(int argc, char *argv[])
345 p_i = i + 1; 344 p_i = i + 1;
346 } 345 }
347 } 346 }
347
348 free(data);
348 } 349 }
349 350
350 if (connected == 1) { 351 if (connected == 1) {