Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:15.0:Ports
antlr3c
fix-hash-double-free.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File fix-hash-double-free.patch of Package antlr3c
From 6f5dad7d06620b4665303c542549d4c14f9fe784 Mon Sep 17 00:00:00 2001 From: Jiri Slaby <jirislaby@gmail.com> Date: Sat, 19 Feb 2011 13:26:35 +0100 Subject: [PATCH] collections: hash, fix double free We should not free the hash entry in antlr3HashFree when we didn't strdup on that earlier. I.e. make the free depend on table->doStrdup. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> --- src/antlr3collections.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/src/antlr3collections.c b/src/antlr3collections.c index 01f3f7e..3e32dc3 100644 --- a/src/antlr3collections.c +++ b/src/antlr3collections.c @@ -237,7 +237,9 @@ antlr3HashFree(pANTLR3_HASH_TABLE table) */ if (entry->keybase.type == ANTLR3_HASH_TYPE_STR && entry->keybase.key.sKey != NULL) { - ANTLR3_FREE(entry->keybase.key.sKey); + if (table->doStrdup == ANTLR3_TRUE) { + ANTLR3_FREE(entry->keybase.key.sKey); + } } /* Free this entry -- 1.7.3.4
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor