some small fix

hi
in source file src/core/global.c:646
nn_msg_term (&msg); will term the hdr and body