also free g_decode_ctx on errors

This commit is contained in:
gullradriel committed 2026-02-11 09:35:00 +01:00
1 parent 581162e17d
commit caa1da746e
1 file changed
+2
+2
View File
@@ -425,6 +425,8 @@ void protopirate_scene_sub_decode_on_enter(void* context) {
app->txrx->history = protopirate_history_alloc();
if(!app->txrx->history) {
FURI_LOG_E(TAG, "Failed to allocate history!");
free(g_decode_ctx);
g_decode_ctx = NULL;
return;
}
}