bugfix: fix segmentation fault in cookie poisoning

memory allocation on shared memory needs to be clean before use.

Signed-off-by: Paul Yang(InfoHunter) <paulyang.inf@gmail.com>