]> sourceware.org Git - systemtap.git/commitdiff
Ensure that NSS has been initialized before attempting to shut it down.
authorJiri Horky <jiri.horky@gmail.com>
Wed, 6 Feb 2013 21:26:41 +0000 (16:26 -0500)
committerDave Brolley <brolley@redhat.com>
Wed, 6 Feb 2013 21:31:54 +0000 (16:31 -0500)
nsscommon.cxx

index 58e1c69b979e96e39b7a5afe5626afaf8c21cb4e..6702725bd3023ca8c407986f909be8783d2262f9 100644 (file)
@@ -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));
This page took 0.026671 seconds and 5 git commands to generate.