Fix CID 11337 by freeing current prior to return
Fix CID 11338 by freeing prior to return
Fix CID 11348 by initializing server to zero