mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 15:22:04 +00:00
[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:
parent
1cd6a174fe
commit
1fa202608e
1 changed files with 4 additions and 1 deletions
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue