Fix memory leak in listFlagsAsStringsAt. (#2145)

This commit is contained in:
karliss 2020-04-14 10:58:25 +03:00 committed by GitHub
parent b7d0c8531b
commit 56543fa0c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3483,7 +3483,10 @@ void CutterCore::addFlag(RVA offset, QString name, RVA size)
QString CutterCore::listFlagsAsStringAt(RVA addr)
{
CORE_LOCK();
return r_flag_get_liststr (core->flags, addr);
char *flagList = r_flag_get_liststr (core->flags, addr);
QString result(flagList);
r_mem_free(flagList);
return result;
}
QString CutterCore::nearestFlag(RVA offset, RVA *flagOffsetOut)