We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 00c2c28 commit 9c9ef5bCopy full SHA for 9c9ef5b
ttyd-tools/rel/source/main.cpp
@@ -219,15 +219,15 @@ void *preventPouchInitMemoryLeak(uint32_t heap, uint32_t size)
219
{
220
// Check if the memory has already been allocated or not
221
void *PouchPtr = ttyd::mario_pouch::pouchGetPtr();
222
- if (!PouchPtr)
+ if (PouchPtr)
223
224
- // The memory has not been allocated, so allocate it
225
- return ttyd::memory::__memAlloc(heap, size);
+ // The memory has already been allocated
+ return PouchPtr;
226
}
227
else
228
229
- // The memory has already been allocated, so clear it
230
- return clearMemory(PouchPtr, size);
+ // The memory has not been allocated, so allocate it
+ return ttyd::memory::__memAlloc(heap, size);
231
232
233
0 commit comments