Fix potential memory leak.
Fix potential memory leak.

If the second memory allocation fails, then we need to free the first.
While we're at it, the zeroing of allocated memory can be replaced by
a call to calloc().

gdtm86/jellyfish,J535D165/jellyfish,jamesturk/jellyfish,jamesturk/jellyfish,gdtm86/jellyfish,pombredanne/jellyfish,J535D165/jellyfish,pombredanne/jellyfish