Fixed the bug that the malloc memory size is smaller than the actual required.

Merges https://github.com/espressif/esp-idf/pull/3757
This commit is contained in:
Ramesh 2019-07-10 08:55:36 +05:30 committed by kooho
parent 0114af25da
commit 8795f1ac86

View File

@ -137,8 +137,8 @@ static void gpio_test_signal(void *arg)
*/
static void disp_captured_signal(void *arg)
{
uint32_t *current_cap_value = (uint32_t *)malloc(sizeof(CAP_SIG_NUM));
uint32_t *previous_cap_value = (uint32_t *)malloc(sizeof(CAP_SIG_NUM));
uint32_t *current_cap_value = (uint32_t *)malloc(CAP_SIG_NUM*sizeof(uint32_t));
uint32_t *previous_cap_value = (uint32_t *)malloc(CAP_SIG_NUM*sizeof(uint32_t));
capture evt;
while (1) {
xQueueReceive(cap_queue, &evt, portMAX_DELAY);