cleanup: use g_new() instead of malloc in prof_add_shutdown_routine()

This commit is contained in:
Michael Vetter
2026-02-27 22:21:42 +01:00
parent 051f986774
commit 02cde29b65

View File

@@ -292,7 +292,7 @@ prof_add_shutdown_routine(void (*routine)(void))
if (g_list_find_custom(shutdown_routines, &this, (GCompareFunc)_cmp_shutdown_routine)) {
return;
}
struct shutdown_routine* r = malloc(sizeof *r);
struct shutdown_routine* r = g_new(struct shutdown_routine, 1);
r->routine = routine;
shutdown_routines = g_list_prepend(shutdown_routines, r);
}