Fix possible AttributeMap corruption on double removal
Motivation: When remove0() is called multiple times for an DefaultAttribute it can cause corruption of the internal linked-list structure. Modifications: - Ensure remove0() can not cause corruption by null out prev and next references. Result: No more corruption possible
This commit is contained in:
parent
99c40431b9
commit
0767da12fb
@ -208,6 +208,11 @@ public class DefaultAttributeMap implements AttributeMap {
|
|||||||
if (next != null) {
|
if (next != null) {
|
||||||
next.prev = prev;
|
next.prev = prev;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Null out prev and next - this will guard against multiple remove0() calls which may corrupt
|
||||||
|
// the linked list for the bucket.
|
||||||
|
prev = null;
|
||||||
|
next = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user