app_jack: fix datastore memory leak in error handling path.