From 87f566e2ac69fc00091df758f0ceb01f890fa00a Mon Sep 17 00:00:00 2001 From: Jiri Horky Date: Wed, 6 Feb 2013 16:26:41 -0500 Subject: [PATCH] Ensure that NSS has been initialized before attempting to shut it down. --- nsscommon.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nsscommon.cxx b/nsscommon.cxx index 58e1c69b9..6702725bd 100644 --- a/nsscommon.cxx +++ b/nsscommon.cxx @@ -1,7 +1,7 @@ /* Common functions used by the NSS-aware code in systemtap. - Copyright (C) 2009-2011 Red Hat Inc. + Copyright (C) 2009-2013 Red Hat Inc. This file is part of systemtap, and is free software. You can redistribute it and/or modify it under the terms of the GNU General Public @@ -181,7 +181,7 @@ nssCleanup (const char *db_path) { // Shutdown NSS and ensure that it went down successfully. This is because we can not // initialize NSS again if it does not. - if (NSS_Shutdown () != SECSuccess) + if (NSS_IsInitialized () && NSS_Shutdown () != SECSuccess) { if (db_path) nsscommon_error (_F("Unable to shutdown NSS for database %s", db_path)); -- 2.43.5