arm64: fix invalid free introduced in 662bb3f6cc204944614267158c1dd0eab03858df

This commit is contained in:
pancake 2022-10-11 18:56:03 +02:00
parent eea96543fa
commit 969686f446
3 changed files with 3 additions and 3 deletions

View File

@ -26297,7 +26297,7 @@ static char *printAliasInstr(MCInst *MI, SStream *OS, MCRegisterInfo *MRI)
}
} while (AsmString[I] != '\0');
}
free(AsmString);
cs_mem_free(AsmString);
return tmpString;
}

View File

@ -788,7 +788,7 @@ for line in lines:
}
} while (AsmString[I] != '\\0');
}
free(AsmString);
cs_mem_free(AsmString);
return tmpString;
}
""")

View File

@ -91,7 +91,7 @@ unsigned int count_positive8(const unsigned char *list)
char *cs_strdup(const char *str)
{
size_t len = strlen(str)+ 1;
size_t len = strlen(str) + 1;
void *new = cs_mem_malloc(len);
if (new == NULL)