• Neil Conway's avatar
    mbutils was previously doing some allocations, including invoking · d3a4d633
    Neil Conway authored
    fmgr_info(), in the TopMemoryContext. I couldn't see that the code
    actually leaked, but in general I think it's fragile to assume that
    pfree'ing an FmgrInfo along with its fn_extra field is enough to
    reclaim all the resources allocated by fmgr_info().  I changed the
    code to do its allocations in a new child context of
    TopMemoryContext, MbProcContext. When we want to release the
    allocations we can just reset the context, which is cleaner.
    d3a4d633
mbutils.c 14.9 KB