Skip to content

Commit d26310b

Browse files
authored
Merge pull request #6 from stickbreaker/stickbreaker-patch-1
Memory Leak
2 parents 89ab899 + 20ba765 commit d26310b

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)