Fix nonce1 and sessionid memory leak