From 99d698480098858883272439b09096586c8b611b Mon Sep 17 00:00:00 2001 From: Tian Hao Date: Fri, 6 Jan 2017 12:24:37 +0800 Subject: [PATCH] component/bt : blufi fix security init bug --- examples/12_blufi/main/blufi_security.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/12_blufi/main/blufi_security.c b/examples/12_blufi/main/blufi_security.c index 94755eaaee..59d889a52d 100644 --- a/examples/12_blufi/main/blufi_security.c +++ b/examples/12_blufi/main/blufi_security.c @@ -184,7 +184,7 @@ esp_err_t blufi_security_init(void) return ESP_FAIL; } - memset(&blufi_sec, 0x0, sizeof(struct blufi_security)); + memset(blufi_sec, 0x0, sizeof(struct blufi_security)); mbedtls_dhm_init(&blufi_sec->dhm); mbedtls_aes_init(&blufi_sec->aes); @@ -198,7 +198,7 @@ void blufi_security_deinit(void) mbedtls_dhm_free(&blufi_sec->dhm); mbedtls_aes_free(&blufi_sec->aes); - memset(&blufi_sec, 0x0, sizeof(struct blufi_security)); + memset(blufi_sec, 0x0, sizeof(struct blufi_security)); free(blufi_sec); blufi_sec = NULL; -- 2.40.0