mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 10:14:46 -04:00
free more carefully making sure we dont double free
This commit is contained in:
parent
4e4088c27c
commit
2d386d87da
@ -32,8 +32,9 @@ class generic_raii {
|
|||||||
|
|
||||||
void release() noexcept {
|
void release() noexcept {
|
||||||
if (handle != null) {
|
if (handle != null) {
|
||||||
free_T(handle);
|
T temp = handle;
|
||||||
handle = null;
|
handle = null;
|
||||||
|
free_T(temp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user