diff options
author | Duncan Ogilvie <mr.exodia.tpodt@gmail.com> | 2023-05-13 06:19:37 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-12 21:19:37 -0700 |
commit | 8b6c7b237c6c36614ddc6942b9568d1c214d25ef (patch) | |
tree | 6dc2a9f04eab015f19a3d42f1ae4b4e80d16c64f /tools | |
parent | e9badc5a77813003baae4e73d4bfd0298069459f (diff) | |
download | yasm-8b6c7b237c6c36614ddc6942b9568d1c214d25ef.tar.gz |
Fix allocator mismatch (#107)
Diffstat (limited to 'tools')
-rw-r--r-- | tools/genperf/genperf.c | 4 | ||||
-rw-r--r-- | tools/genperf/perfect.c | 18 |
2 files changed, 11 insertions, 11 deletions
diff --git a/tools/genperf/genperf.c b/tools/genperf/genperf.c index c3cfa766..073b7502 100644 --- a/tools/genperf/genperf.c +++ b/tools/genperf/genperf.c @@ -242,8 +242,8 @@ perfect_gen(FILE *out, const char *lookup_function_name, fprintf(out, "}\n"); fprintf(out, "\n"); - free(tab); - free(tabh); + yasm_xfree(tab); + yasm_xfree(tabh); } int diff --git a/tools/genperf/perfect.c b/tools/genperf/perfect.c index a9a14c02..fa5a4897 100644 --- a/tools/genperf/perfect.c +++ b/tools/genperf/perfect.c @@ -635,7 +635,7 @@ static void hash_ab( else { /* try with 2*smax */ - free((void *)tabh); + yasm_xfree((void *)tabh); *smax = *smax * 2; scrambleinit(scramble, *smax); tabh = (hstuff *)yasm_xmalloc(sizeof(hstuff)*(form->perfect == MINIMAL_HP ? @@ -671,8 +671,8 @@ static void hash_ab( sprintf(final->line[0], " unsigned long rsl = (a ^ scramble[tab[b]]);\n"); } - free((void *)tabq); - free((void *)tabh); + yasm_xfree((void *)tabq); + yasm_xfree((void *)tabh); } @@ -883,8 +883,8 @@ void findhash( else if (*blen < *smax) { *blen *= 2; - free(tabq); - free(*tabb); + yasm_xfree(tabq); + yasm_xfree(*tabb); *tabb = (bstuff *)yasm_xmalloc((size_t)(sizeof(bstuff)*(*blen))); tabq = (qstuff *)yasm_xmalloc((size_t)(sizeof(qstuff)*(*blen+1))); } @@ -909,8 +909,8 @@ void findhash( if (*blen < *smax) { *blen *= 2; - free(*tabb); - free(tabq); + yasm_xfree(*tabb); + yasm_xfree(tabq); *tabb = (bstuff *)yasm_xmalloc((size_t)(sizeof(bstuff)*(*blen))); tabq = (qstuff *)yasm_xmalloc((size_t)(sizeof(qstuff)*(*blen+1))); --trysalt; /* we know this salt got distinct (A,B) */ @@ -930,7 +930,7 @@ void findhash( } /* free working memory */ - free((void *)tabq); + yasm_xfree((void *)tabq); } #if 0 @@ -1149,7 +1149,7 @@ hashform *form; /* user directives */ /* clean up memory sources */ refree(textroot); refree(keyroot); - free((void *)tab); + yasm_xfree((void *)tab); } |