Skip to content

Commit

Permalink
MQTTAsync_receiveThread() logs an error in case of unexpected and the…
Browse files Browse the repository at this point in the history
…refore unprocessed pack type

Unprocessed pack lead to memory leak, as in
#1518

Signed-off-by: Juergen Kosel <[email protected]>
  • Loading branch information
JuergenKosel committed Sep 4, 2024
1 parent 27fb21e commit a2fd510
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/MQTTAsyncUtils.c
Original file line number Diff line number Diff line change
Expand Up @@ -2320,6 +2320,10 @@ thread_return_type WINAPI MQTTAsync_receiveThread(void* n)
m->c->connected = 0; /* don't send disconnect packet back */
nextOrClose(m, discrc, "Received disconnect");
}
else
{
Log(LOG_ERROR, -1, "Unexpected packet type %d", pack->header.bits.type);
}
}
}
}
Expand Down

0 comments on commit a2fd510

Please sign in to comment.