• Andrei Elkin's avatar
    Bug#13437900 - VALGRIND REPORTS A LEAK FOR REPL_IGNORE_SERVER_IDS · 9937d5f0
    Andrei Elkin authored
    There was memory leak when running some tests on PB2.
    The reason of the failure is an early return from change_master()
    that was supposed to deallocate a dyn-array.
    
    Fixed with relocating the dyn-array's destructor at ~LEX() that is
    the end of the session, per Gleb's patch idea.
    Two optimizations were done: the static buffer for the dyn-array to base on,
    and the array initialization is called precisely when it's necessary rather than
    per each CHANGE-MASTER as before.
     
    9937d5f0
rpl_empty_master_host.test 1.79 KB