this malloc is unnecessary, you should be able to copy data directly from the packet right?