If an error occurs in VmBackupStartCommon, the keepAlive timer is not
stopped. This can lead to a crash when the timer callback runs after
gBackupState is NULL.
Signed-off-by: Dmitry Torokhov <dtor@vmware.com>
return RPCIN_SETRETVALS(data, "", TRUE);
error:
+ if (gBackupState->keepAlive != NULL) {
+ g_source_destroy(gBackupState->keepAlive);
+ g_source_unref(gBackupState->keepAlive);
+ gBackupState->keepAlive = NULL;
+ }
if (gBackupState->provider) {
gBackupState->provider->release(gBackupState->provider);
}