fix memory leak when waking from screensaver mode
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -7,7 +7,7 @@ const char preferences_widget_titles[PREFERENCES_WIDGET_NUM_PREFEFENCES][11] = {
|
||||
|
||||
void preferences_widget_setup(LauncherSettings *settings, void ** context_ptr) {
|
||||
(void) settings;
|
||||
*context_ptr = malloc(sizeof(uint8_t));
|
||||
if (*context_ptr == NULL) *context_ptr = malloc(sizeof(uint8_t));
|
||||
}
|
||||
|
||||
void preferences_widget_activate(LauncherSettings *settings, void *context) {
|
||||
|
||||
@@ -7,7 +7,7 @@ const char set_time_widget_titles[SET_TIME_WIDGET_NUM_SETTINGS][3] = {"HR", "MN"
|
||||
|
||||
void set_time_widget_setup(LauncherSettings *settings, void ** context_ptr) {
|
||||
(void) settings;
|
||||
*context_ptr = malloc(sizeof(uint8_t));
|
||||
if (*context_ptr == NULL) *context_ptr = malloc(sizeof(uint8_t));
|
||||
}
|
||||
|
||||
void set_time_widget_activate(LauncherSettings *settings, void *context) {
|
||||
|
||||
Reference in New Issue
Block a user