From a9fe413dd0be1a221747905fb5b199f4dc3b6520 Mon Sep 17 00:00:00 2001 From: Vitor Santos Costa Date: Fri, 20 May 2016 01:59:17 +0100 Subject: [PATCH] valgrind. --- C/init.c | 2 ++ C/text.c | 3 +++ 2 files changed, 5 insertions(+) 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; }