Skip to content

Commit 20ba765

Browse files
authored
Memory Leak
Release EventGroup, Heap Memory for dq
1 parent 89ab899 commit 20ba765

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Diff for: cores/esp32/esp32-hal-i2c.c

+5-1
Original file line numberDiff line numberDiff line change
@@ -1130,7 +1130,11 @@ if(i2c->intr_handle){
11301130
// log_e("released ISR=%d",error);
11311131
i2c->intr_handle=NULL;
11321132
}
1133-
return I2C_ERROR_OK;
1133+
if(i2c->i2c_event){
1134+
xEventGroupDelete(i2c->i2c_event);
1135+
i2c->i2c_event = NULL;
1136+
}
1137+
return i2cFreeQueue(i2c); //release dynamic memory
11341138
}
11351139

11361140
/* todo

0 commit comments

Comments
 (0)