[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

View file

@ -279,7 +279,10 @@ merge_method_lists (methodlist_t *dst, methodlist_t *src)
s->next = 0; s->next = 0;
if (method_in_list (dst, s)) { if (method_in_list (dst, s)) {
debug (0, "dropping duplicate method: %s", s->name); 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 { } else {
// add_method does the duplicate check // add_method does the duplicate check
*dst->tail = s; *dst->tail = s;