fix memory leak when waking from screensaver mode

This commit is contained in:
Joey Castillo
2021-10-05 15:55:34 -04:00
parent 83192b3a58
commit 8372e37bea
4 changed files with 11 additions and 3 deletions

View File

@@ -5,7 +5,7 @@
void simple_clock_widget_setup(LauncherSettings *settings, void ** context_ptr) {
(void) settings;
// the only context we need is the timestamp of the previous tick.
*context_ptr = malloc(sizeof(uint32_t));
if (*context_ptr == NULL) *context_ptr = malloc(sizeof(uint32_t));
}
void simple_clock_widget_activate(LauncherSettings *settings, void *context) {