Skip to content

Commit d113ba2

Browse files
SuGliderCopilot
andauthored
fix(zigbee_ep): fix variable scope
Co-authored-by: Copilot <[email protected]>
1 parent 4681be4 commit d113ba2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: libraries/Zigbee/src/ZigbeeEP.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ void ZigbeeEP::zbReadBasicCluster(const esp_zb_zcl_attribute_t *attribute) {
250250
/* Basic cluster attributes */
251251
if (attribute->id == ESP_ZB_ZCL_ATTR_BASIC_MANUFACTURER_NAME_ID && attribute->data.type == ESP_ZB_ZCL_ATTR_TYPE_CHAR_STRING && attribute->data.value) {
252252
zbstring_t *zbstr = (zbstring_t *)attribute->data.value;
253-
char *_read_manufacturer = (char *)malloc(zbstr->len + 1);
253+
_read_manufacturer = (char *)malloc(zbstr->len + 1);
254254
if (_read_manufacturer == NULL) {
255255
log_e("Failed to allocate memory for manufacturer data");
256256
xSemaphoreGive(lock);

0 commit comments

Comments
 (0)