enable lto and fix memory leak

This commit is contained in:
BernardoGiordano 2019-04-23 19:21:53 +02:00
parent 65a09c497e
commit 92a3d49f72
3 changed files with 3 additions and 2 deletions

View file

@ -74,7 +74,7 @@ ICON_FLAGS := nosavebackups,visible
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
ARCH := -march=armv6k -mtune=mpcore -mfloat-abi=hard -mtp=soft ARCH := -march=armv6k -mtune=mpcore -mfloat-abi=hard -mtp=soft
CFLAGS := -g -Wall -Wextra -Wno-psabi -O2 -mword-relocations \ CFLAGS := -g -Wall -Wextra -Wno-psabi -O2 -mword-relocations -flto \
-fomit-frame-pointer -ffunction-sections \ -fomit-frame-pointer -ffunction-sections \
$(ARCH) \ $(ARCH) \
-DVERSION_MAJOR=${VERSION_MAJOR} \ -DVERSION_MAJOR=${VERSION_MAJOR} \

View file

@ -960,7 +960,7 @@ static bool scanCard(void)
isScanning = true; isScanning = true;
} }
bool ret; bool ret = false;
Result res = 0; Result res = 0;
u32 count = 0; u32 count = 0;
FS_CardType cardType; FS_CardType cardType;

View file

@ -218,6 +218,7 @@ void loadTitles(void)
Result res = fsOpenSaveDataIterator(&iterator, FsSaveDataSpaceId_NandUser); Result res = fsOpenSaveDataIterator(&iterator, FsSaveDataSpaceId_NandUser);
if (R_FAILED(res)) if (R_FAILED(res))
{ {
free(nsacd);
return; return;
} }