free context correctly

This commit is contained in:
FelixKratz 2021-09-02 23:52:14 +02:00
parent 470cef7562
commit c4a946ff96

View file

@ -195,7 +195,7 @@ void bar_manager_handle_system_woke(struct bar_manager* bar_manager) {
void bar_manager_handle_notification(struct bar_manager* bar_manager, char* context) {
char* name = custom_events_get_name_for_notification(&bar_manager->custom_events, context);
free(context);
if (!name) return;
bar_manager_custom_events_trigger(bar_manager, name);
free(context);
}