Skip to content

Commit 7ad636f

Browse files
authored
fix(zigbeeEP): destructor shall free any allocated memory
1 parent d3a44fc commit 7ad636f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

libraries/Zigbee/src/ZigbeeEP.h

+4-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,10 @@ typedef enum {
4242
class ZigbeeEP {
4343
public:
4444
ZigbeeEP(uint8_t endpoint = 10);
45-
~ZigbeeEP() {}
45+
~ZigbeeEP() {
46+
free(_read_manufacturer);
47+
free(_read_model);
48+
}
4649

4750
// Set ep config and cluster list
4851
void setEpConfig(esp_zb_endpoint_config_t ep_config, esp_zb_cluster_list_t *cluster_list) {

0 commit comments

Comments
 (0)