From fa991397bdf0561bd80ce4deefb3f8f695bca39a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Jaramago=20Fern=C3=A1ndez?= Date: Thu, 23 Jul 2020 14:46:42 +0200 Subject: [PATCH] Reverted buffer allocation and removed unnecessary newline character --- lib/MySQL_HostGroups_Manager.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/MySQL_HostGroups_Manager.cpp b/lib/MySQL_HostGroups_Manager.cpp index 51b3895f8..551269940 100644 --- a/lib/MySQL_HostGroups_Manager.cpp +++ b/lib/MySQL_HostGroups_Manager.cpp @@ -468,10 +468,9 @@ bool GTID_Server_Data::read_next_gtid() { char rec_msg[80]; if (strncmp(data+pos,(char *)"ST=",3)==0) { // we are reading the bootstrap - char *bs = (char *)malloc(l+1+1-3); // length + 1 (null byte) + 1 (newline) - 3 (header) + char *bs = (char *)malloc(l+1-3); // length + 1 (null byte) - 3 (header) memcpy(bs, data+pos+3, l-3); bs[l-3] = '\0'; - bs[l-3+1] = '\n'; char *saveptr1=NULL; char *saveptr2=NULL; //char *saveptr3=NULL;