core/cpu: Fix theoretical use-after-free if no_return job returns
Practically speaking this should/would never happen, but static analysis
caught it, and just *maybe* at some time in the future, someone will
have less of a terrible day debugging something terrible if we fix it.
@@ -361,6 +361,10 @@ void cpu_process_jobs(void)
free(job);
func(data);
if (!list_empty(&cpu->locks_held)) {
+ if (no_return)
+ prlog(PR_ERR, "OPAL no-return job returned with"
+ "locks held!\n");
+ else
prlog(PR_ERR, "OPAL job %s returning with locks held\n",
job->name);
drop_my_locks(true);
