diff --git a/C/init.c b/C/init.c index 40eac7037..ed89d4b0b 100755 --- a/C/init.c +++ b/C/init.c @@ -1472,5 +1472,7 @@ void Yap_exit(int value) { } Yap_CloseStreams(false); Yap_CloseReadline(); +#if USE_SYSTEM_MALLOC +#endif exit(value); } diff --git a/C/text.c b/C/text.c index 412fe51a7..28a67c700 100644 --- a/C/text.c +++ b/C/text.c @@ -1416,6 +1416,9 @@ void *Yap_Concat_Text(int n, seq_tv_t inp[], seq_tv_t *out USES_REGS) { lengv = (size_t *)malloc(n * sizeof(size_t)); HEAP_ERROR(lengv, size_t); buf = concat(n, out, bufv, encv, lengv PASS_REGS); + free(bufv); + free(lengv); + free(encv); return buf; }