Skip to content

Commit

Permalink
Bugfix: Memory leak in hap_send_notification
Browse files Browse the repository at this point in the history
Fixed a memory leak in hap_send_notification (hap_char_update_val)
  • Loading branch information
MacWyznawca authored and shahpiyushv committed Oct 29, 2020
1 parent 9bb1887 commit 23a2e78
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion components/homekit/esp_hap_core/src/esp_hap_ip_services.c
Original file line number Diff line number Diff line change
Expand Up @@ -1310,8 +1310,9 @@ static void hap_send_notification(void *arg)
break;
}
}
/* If no characteristic notifications are pending, just exit */
/* If no characteristic notifications are pending, free char_arr and exit */
if (i == 0) {
hap_platform_memory_free(char_arr);
return;
}
num_notif_chars = i;
Expand Down

0 comments on commit 23a2e78

Please sign in to comment.