mirror of
https://github.com/tobast/libunwind-eh_elf.git
synced 2024-07-02 13:41:46 +02:00
Cleanup a mapped elf image.
Without this, we end up with mmap leaks. Thanks to Humberto Abdelnur for suggesting this.
This commit is contained in:
parent
7bd264e292
commit
6203f1cd0f
|
@ -26,7 +26,13 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||||
#include "_UPT_internal.h"
|
#include "_UPT_internal.h"
|
||||||
|
|
||||||
void
|
void
|
||||||
_UPT_destroy (void *ui)
|
_UPT_destroy (void *ptr)
|
||||||
{
|
{
|
||||||
free (ui);
|
struct UPT_info *ui = (struct UPT_info *) ptr;
|
||||||
|
if (ui->ei.image)
|
||||||
|
{
|
||||||
|
munmap(ui->ei.image, ui->ei.size);
|
||||||
|
}
|
||||||
|
|
||||||
|
free (ptr);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue