If you want to run mtrace to find a memory leak:
build with all your normal flags + MEMTRACE=1
make sure mtracefile does not exist in the $HOME dir
run the server from the $HOME dir. Do not run any other program like yangcli-pro from this dir or it will clobber your mtracefile
Put this line in your .bashrc (then source .bashrc)
export MALLOC_TRACE=./mtracefile
This will put the mtracefile in the dir where the program is run Another thing to have in your .bashrc:
ulimit -c unlimited