Skip to content

Commit

Permalink
Set platform_data to NULL after free
Browse files Browse the repository at this point in the history
  • Loading branch information
pguyot authored Jan 2, 2025
1 parent e0a1f6e commit 0753a76
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/platforms/esp32/components/avm_builtins/uart_driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,7 @@ static void uart_driver_do_close(Context *ctx, GenMessage gen_message)
}

free(uart_data);
ctx->platform_data = NULL;
}

static NativeHandlerResult uart_driver_consume_mailbox(Context *ctx)
Expand Down

0 comments on commit 0753a76

Please sign in to comment.