mirror of
https://github.com/kovidgoyal/kitty
synced 2026-06-06 09:15:57 +02:00
Add check for NULL after malloc()
This commit is contained in:
1
glfw/linux_notify.c
vendored
1
glfw/linux_notify.c
vendored
@@ -72,6 +72,7 @@ glfw_dbus_send_user_notification(const char *app_name, const char* icon, const c
|
||||
added_signal_match = session_bus;
|
||||
}
|
||||
NotificationCreatedData *data = malloc(sizeof(NotificationCreatedData));
|
||||
if (!data) return 0;
|
||||
data->next_id = ++notification_id;
|
||||
data->callback = callback; data->data = user_data;
|
||||
if (!data->next_id) data->next_id = ++notification_id;
|
||||
|
||||
Reference in New Issue
Block a user