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
54293003ef
commit
6b67f8ec81
@ -172,6 +172,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