The clonefrom implementation for IdMap drops the values present in the map and then begins cloning values from the other map. If a .clone() call pancics, then the afformentioned dropped elements can be freed again. getor_insert
getorinsert reserves space for a value, before calling the user provided insertion function f. If the function f panics then uninitialized or previously freed memory can be dropped. remove_set
When removing a set of elements, ptr::dropinplace is called on each of the element to be removed. If the Drop impl of one of these elements panics then the previously dropped elements can be dropped again.
{ "nvd_published_at": null, "cwe_ids": [ "CWE-415" ], "severity": "CRITICAL", "github_reviewed": true, "github_reviewed_at": "2021-08-19T17:04:17Z" }