You're leaking the resources created with jlog_new here.