Commit c37cacab authored by Amarnath Valluri's avatar Amarnath Valluri Committed by Stefan Berger
Browse files

tpm: Move tpm_cleanup() to right place



As Emulator TPM backend uses chardev, tpm cleanup should happen before chardev
similar to other vhost-users.

Signed-off-by: default avatarAmarnath Valluri <amarnath.valluri@intel.com>
Reviewed-by: default avatarStefan Berger <stefanb@linux.vnet.ibm.com>
Signed-off-by: default avatarStefan Berger <stefanb@linux.vnet.ibm.com>
parent f4ede81e
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -172,7 +172,6 @@ int tpm_init(void)
        return -1;
    }

    atexit(tpm_cleanup);
    return 0;
}

+1 −0
Original line number Diff line number Diff line
@@ -4905,6 +4905,7 @@ int main(int argc, char **argv, char **envp)
    res_free();

    /* vhost-user must be cleaned up before chardevs.  */
    tpm_cleanup();
    net_cleanup();
    audio_cleanup();
    monitor_cleanup();