Allocate memory properly for packet payload