[qfcc] Don't free duplicate method when merging

The method is still held by known_methods, so freeing it causes grief.
However, it may cause a leak thus the free is only commented out. More
investigation is needed. I'm surprised the problem didn't show on linux,
but cygwin-native hit it and valgrind on linux found the spot :)
This commit is contained in:
Bill Currie 2022-09-19 16:39:25 +01:00
parent 1cd6a174fe
commit 1fa202608e
1 changed files with 4 additions and 1 deletions

View File

@ -279,7 +279,10 @@ merge_method_lists (methodlist_t *dst, methodlist_t *src)
s->next = 0;
if (method_in_list (dst, s)) {
debug (0, "dropping duplicate method: %s", s->name);
free (s);
//FIXME this free is currently erroneous as it remains in
//known_methods, but it may also be a leak, thus only
//commented out for now.
//free (s);
} else {
// add_method does the duplicate check
*dst->tail = s;