We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ee3ea29 commit 6c849c6Copy full SHA for 6c849c6
lib/mqtt_msg.c
@@ -619,7 +619,7 @@ int mqtt_has_valid_msg_hdr(uint8_t *buffer, size_t length)
619
esp_err_t mqtt_msg_buffer_init(mqtt_connection_t *connection, int buffer_size)
620
{
621
memset(connection, 0, sizeof(mqtt_connection_t));
622
- connection->buffer = (uint8_t *)calloc(0, buffer_size);
+ connection->buffer = (uint8_t *)calloc(buffer_size, sizeof(uint8_t));
623
if (!connection->buffer) {
624
return ESP_ERR_NO_MEM;
625
}
0 commit comments