Fix leak and related double-free

William was nice enough to stop by and point out how foolish I was to
have set the initialized flag to false, but failed to set it to true.
This was embarrassing.  To make matters worse, I managed to violate the
terms of the API in my tests and free the pointer that I was told not
to.  This of course, causes a double-free failure.

This change rectifies both problems and serves as the public shaming
that I so duly deserve.

Signed-off-by: Michael Leibowitz <michael.leibowitz@intel.com>