In an unlikely event of virConnectRegisterCloseCallback failing,
the error is ignored. This is an example file and we shouldn't
get a bad example.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
goto cleanup;
}
- virConnectRegisterCloseCallback(dconn,
- connectClose, NULL, NULL);
+ if (virConnectRegisterCloseCallback(dconn,
+ connectClose, NULL, NULL) < 0) {
+ fprintf(stderr, "Unable to register close callback\n");
+ goto cleanup;
+ }
sigaction(SIGTERM, &action_stop, NULL);
sigaction(SIGINT, &action_stop, NULL);