Skip to content

PeDeinit

Description

Release storage owned by a Pe. Frees data through allocator (unconditional – parser always owns its bytes) and tears down the sections vector. Safe on a zeroed struct.

Usage example (Cross-references)

Usage examples (Cross-references)
        ok = ok && pe.codeview.pdb_path && ZstrCompare(pe.codeview.pdb_path, kPdbPath) == 0;
    
        PeDeinit(&pe);
        DefaultAllocatorDeinit(&alloc);
        return ok;
        ok          = ok && !PeRvaToOffset(&pe, 0xdead0000, &garbage);
    
        PeDeinit(&pe);
        DefaultAllocatorDeinit(&alloc);
        return ok;
                PdbDeinit(&e->pdb);
            if (e->pe_open)
                PeDeinit(&e->pe);
            if (e->module_path && self->allocator) {
                u64 n = 0;
    
    fail:
        PeDeinit(out);
        return false;
    }
    }
    
    void PeDeinit(Pe *self) {
        if (!self)
            return;
Last updated on