Fixed double-freed of requests map, and memory leak of message2key

Change-Id: I602fe93f88b8399156f3e9eb7f38486e6752e4b7