mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-17 04:34:44 -07:00
Fix some memory management bugs in apps
This commit is contained in:
3
applications/external/flipfrid/flipfrid.c
vendored
3
applications/external/flipfrid/flipfrid.c
vendored
@@ -121,9 +121,6 @@ void flipfrid_free(FlipFridState* flipfrid) {
|
|||||||
furi_string_free(flipfrid->main_menu_proto_items[i]);
|
furi_string_free(flipfrid->main_menu_proto_items[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
free(flipfrid->data);
|
|
||||||
free(flipfrid->payload);
|
|
||||||
|
|
||||||
// The rest
|
// The rest
|
||||||
free(flipfrid);
|
free(flipfrid);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -121,9 +121,6 @@ void ibtnfuzzer_free(iBtnFuzzerState* ibtnfuzzer) {
|
|||||||
furi_string_free(ibtnfuzzer->main_menu_proto_items[i]);
|
furi_string_free(ibtnfuzzer->main_menu_proto_items[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
free(ibtnfuzzer->data);
|
|
||||||
free(ibtnfuzzer->payload);
|
|
||||||
|
|
||||||
// The rest
|
// The rest
|
||||||
free(ibtnfuzzer);
|
free(ibtnfuzzer);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -168,31 +168,22 @@ static char char_to_uppercase(const char letter) {
|
|||||||
switch(letter) {
|
switch(letter) {
|
||||||
case '_':
|
case '_':
|
||||||
return 0x20;
|
return 0x20;
|
||||||
break;
|
|
||||||
case '(':
|
case '(':
|
||||||
return 0x29;
|
return 0x29;
|
||||||
break;
|
|
||||||
case '{':
|
case '{':
|
||||||
return 0x7d;
|
return 0x7d;
|
||||||
break;
|
|
||||||
case '[':
|
case '[':
|
||||||
return 0x5d;
|
return 0x5d;
|
||||||
break;
|
|
||||||
case '/':
|
case '/':
|
||||||
return 0x5c;
|
return 0x5c;
|
||||||
break;
|
|
||||||
case ';':
|
case ';':
|
||||||
return 0x3a;
|
return 0x3a;
|
||||||
break;
|
|
||||||
case '.':
|
case '.':
|
||||||
return 0x2c;
|
return 0x2c;
|
||||||
break;
|
|
||||||
case '!':
|
case '!':
|
||||||
return 0x3f;
|
return 0x3f;
|
||||||
break;
|
|
||||||
case '<':
|
case '<':
|
||||||
return 0x3e;
|
return 0x3e;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
if(char_is_lowercase(letter)) {
|
if(char_is_lowercase(letter)) {
|
||||||
return (letter - 0x20);
|
return (letter - 0x20);
|
||||||
|
|||||||
6
applications/external/wiiec/wii_anal.c
vendored
6
applications/external/wiiec/wii_anal.c
vendored
@@ -488,13 +488,13 @@ int32_t wii_ec_anal(void) {
|
|||||||
|
|
||||||
bail:
|
bail:
|
||||||
// 10. Release system notification queue
|
// 10. Release system notification queue
|
||||||
if(state->notify) {
|
if(state && state->notify) {
|
||||||
furi_record_close(RECORD_NOTIFICATION);
|
furi_record_close(RECORD_NOTIFICATION);
|
||||||
state->notify = NULL;
|
state->notify = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 9. Stop the timer
|
// 9. Stop the timer
|
||||||
if(state->timer) {
|
if(state && state->timer) {
|
||||||
(void)furi_timer_stop(state->timer);
|
(void)furi_timer_stop(state->timer);
|
||||||
furi_timer_free(state->timer);
|
furi_timer_free(state->timer);
|
||||||
state->timer = NULL;
|
state->timer = NULL;
|
||||||
@@ -515,7 +515,7 @@ bail:
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 5. Free the mutex
|
// 5. Free the mutex
|
||||||
if(state->mutex) {
|
if(state && state->mutex) {
|
||||||
furi_mutex_free(state->mutex);
|
furi_mutex_free(state->mutex);
|
||||||
state->mutex = NULL;
|
state->mutex = NULL;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user