[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Tinycc-devel] [PATCH] pp table_ident freeing 2/1
From: |
Thomas Preud'homme |
Subject: |
Re: [Tinycc-devel] [PATCH] pp table_ident freeing 2/1 |
Date: |
Sat, 03 Jan 2015 21:18:56 +0000 |
User-agent: |
KMail/4.14.1 (Linux/2.6.38-ac2-ac100; KDE/4.14.2; armv7l; ; ) |
Le samedi 3 janvier 2015, 06:11:12 Sergey Korshunoff a écrit :
> Lets "table_ident = NULL" after "tcc_free(table_ident)" in libtcc.
> Before this done a some test are failing with a memory double freeing
> error. triggered by first patch.
Hi Sergey,
I don't disagree to this patch per se but there is probably another problem.
tcc_new () already call preprocess_new that sets table_ident to NULL so the
realloc of table_ident in tccpp.c should be fine and there shouldn't be a
double free.
Besides, if you sets table_ident here you should remove the similar line from
preprocess_new in my opinion.
Best regards,
Thomas