All other destructors in the same .c file return NULL, let's make sure
the one where this so far wasn't done does it too.
return 0;
}
-void free_sleep_config(SleepConfig *sc) {
+SleepConfig* free_sleep_config(SleepConfig *sc) {
if (!sc)
- return;
+ return NULL;
strv_free(sc->suspend_modes);
strv_free(sc->suspend_states);
strv_free(sc->hybrid_modes);
strv_free(sc->hybrid_states);
- free(sc);
+ return mfree(sc);
}
usec_t hibernate_delay_sec; /* HibernateDelaySec */
} SleepConfig;
-void free_sleep_config(SleepConfig *sc);
+SleepConfig* free_sleep_config(SleepConfig *sc);
DEFINE_TRIVIAL_CLEANUP_FUNC(SleepConfig*, free_sleep_config);
/* entry in /proc/swaps */