Unlikely to hit in real life, but clang noticed it.
* tests/commandtest.c (checkoutput, test4, test18): Avoid
unlink(NULL) on OOM.
ret = 0;
cleanup:
- unlink(actualname);
+ if (actualname)
+ unlink(actualname);
VIR_FREE(actuallog);
VIR_FREE(actualname);
VIR_FREE(expectlog);
cleanup:
virCommandFree(cmd);
- unlink(pidfile);
+ if (pidfile)
+ unlink(pidfile);
VIR_FREE(pidfile);
return ret;
}
cleanup:
virCommandFree(cmd);
- unlink(pidfile);
+ if (pidfile)
+ unlink(pidfile);
VIR_FREE(pidfile);
return ret;
}