fixed username/password server memory leak

This commit is contained in:
Václav Šmejkal 2025-02-01 21:32:41 +01:00
parent ca6b81943a
commit c1ee049f32
Signed by: ENGO150
GPG Key ID: 4A57E86482968843

View File

@ -561,6 +561,7 @@ void *why2_communicate_thread(void *arg)
{
//DEALLOCATE
why2_deallocate(code);
why2_deallocate(raw);
if ((raw = read_user(connection, &raw_ptr)) == NULL) //READ
{
@ -621,10 +622,12 @@ void *why2_communicate_thread(void *arg)
//KEEP READING UNTIL CODE ARRIVES
char *code = NULL;
why2_bool exiting_read = 0;
raw = NULL;
do
{
//DEALLOCATE
why2_deallocate(code);
why2_deallocate(raw);
if ((raw = read_user(connection, &raw_ptr)) == NULL) //READ
{
@ -652,10 +655,12 @@ void *why2_communicate_thread(void *arg)
//KEEP READING UNTIL CODE ARRIVES
char *code = NULL;
why2_bool exiting_read = 0;
raw = NULL;
do
{
//DEALLOCATE
why2_deallocate(code);
why2_deallocate(raw);
if ((raw = read_user(connection, &raw_ptr)) == NULL) //READ
{