fix bug for mapi_get_next_pkt in DiMAPI and some memory leaks git-svn-id: file:///home/svn/mapi/trunk@574 8d5bb341-7cf1-0310-8cf6-ba355fef3186