aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Steven Schubiger <stsc@refcnt.org>2020-12-30 18:38:30 +0100
committerGravatar Steven Schubiger <stsc@refcnt.org>2020-12-30 18:38:30 +0100
commit1726f536e36e0eeef71b56390402f0b060387fa4 (patch)
tree55d443538a4ec4a13646946ff73381c0c3681caa
parent4709972f1cfb9f69f631207d9e8c925e9dbf0797 (diff)
downloadcolorize-1726f536e36e0eeef71b56390402f0b060387fa4.tar.gz
colorize-1726f536e36e0eeef71b56390402f0b060387fa4.tar.bz2
release(): strengthen check for equal pointers
-rw-r--r--colorize.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/colorize.c b/colorize.c
index b1d9ecc..38b2350 100644
--- a/colorize.c
+++ b/colorize.c
@@ -1927,7 +1927,8 @@ release (struct var_list *list, unsigned int stacked, void **ptr)
for (i = 0; i < stacked; i++)
{
struct var_list *var = &list[i];
- if (var->ptr == *ptr)
+ if (var->type != IS_UNUSED
+ && var->ptr == *ptr)
{
switch (var->type)
{