Make sure we allocate an array of the correct size.

Signed-off-by: John Else <john.else@citrix.com>