diff --git a/lib/PgSQL_Protocol.cpp b/lib/PgSQL_Protocol.cpp index 1a87ff8a4..b152a4b49 100644 --- a/lib/PgSQL_Protocol.cpp +++ b/lib/PgSQL_Protocol.cpp @@ -767,6 +767,7 @@ EXECUTION_STATE PgSQL_Protocol::process_handshake_response_packet(unsigned char* #endif // debug (*myds)->sess->default_hostgroup = default_hostgroup; //(*myds)->sess->default_schema = default_schema; // just the pointer is passed + if ((*myds)->sess->user_attributes) free((*myds)->sess->user_attributes); (*myds)->sess->user_attributes = attributes; // just the pointer is passed //(*myds)->sess->schema_locked = schema_locked; (*myds)->sess->transaction_persistent = transaction_persistent; @@ -794,6 +795,8 @@ EXECUTION_STATE PgSQL_Protocol::process_handshake_response_packet(unsigned char* password = l_strdup(mysql_thread___monitor_password); } } + + if (attributes) free(attributes); } if (password) {