Skip to content

Commit

Permalink
Fix a crash related to i2c close
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Guyot <pguyot@kallisys.net>
  • Loading branch information
pguyot committed Dec 9, 2023
1 parent 5b144a5 commit ec1401c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/platforms/esp32/components/avm_builtins/i2c_driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ static void i2c_driver_close(Context *ctx)
ESP_LOGW(TAG, "Failed to delete I2C driver. err=%i", err);
}
free(ctx->platform_data);
ctx->platform_data = NULL;
}

static term i2cdriver_begin_transmission(Context *ctx, term pid, term req)
Expand Down

0 comments on commit ec1401c

Please sign in to comment.