• Sergei Golubchik's avatar
    MDEV-23097 heap-use-after-free in mysqlimport · 07a670b8
    Sergei Golubchik authored
    mysqlimport starts many worker threads. when one of the worker
    encounters an error, it frees global memory and calls exit().
    
    it suppresses memory leak detector, because, as the comment says
    "dirty exit, some threads are still running", indeed, it cannot
    free the memory from other threads.
    
    but precisely because some threads are still running, they
    might use this global memory, so it cannot be freed.
    
    fix: if we know that some threads are still running and accept
    that we cannot free all memory anyway, let's not free global
    allocations either
    07a670b8
mysqlimport.c 23.5 KB