]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Fix a couple of gsource handle leaks in the vmbackup plugin.
authorVMware, Inc <>
Thu, 17 Jun 2010 21:56:27 +0000 (14:56 -0700)
committerMarcelo Vanzin <mvanzin@vmware.com>
Thu, 17 Jun 2010 21:56:27 +0000 (14:56 -0700)
Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
open-vm-tools/services/plugins/vmbackup/stateMachine.c

index b44c168efb583b298ea93a8a4b35ae1c8a7f1c60..45fb4012a738071175a91687e7fcb291558c429f 100644 (file)
@@ -152,6 +152,7 @@ VmBackup_SendEvent(const char *event,
    g_debug("*** %s\n", __FUNCTION__);
    if (gBackupState->keepAlive != NULL) {
       g_source_destroy(gBackupState->keepAlive);
+      g_source_unref(gBackupState->keepAlive);
    }
 
    msg = g_strdup_printf(VMBACKUP_PROTOCOL_EVENT_SET" %s %u %s", event, code, desc);
@@ -195,10 +196,12 @@ VmBackupFinalize(void)
 
    if (gBackupState->timerEvent != NULL) {
       g_source_destroy(gBackupState->timerEvent);
+      g_source_unref(gBackupState->timerEvent);
    }
 
    if (gBackupState->keepAlive != NULL) {
       g_source_destroy(gBackupState->keepAlive);
+      g_source_unref(gBackupState->keepAlive);
    }
 
    gBackupState->provider->release(gBackupState->provider);