From 93ea565accc8533eebac373e846d5d4e238f11ea Mon Sep 17 00:00:00 2001 From: Lukas Berk Date: Wed, 11 May 2011 13:30:27 -0400 Subject: [PATCH] Add NULL check to second PR_Close(local_file_fd) --- nsscommon.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nsscommon.cxx b/nsscommon.cxx index 40b633392..6de46e858 100644 --- a/nsscommon.cxx +++ b/nsscommon.cxx @@ -1286,7 +1286,8 @@ void sign_file ( SGN_DestroyContext (sgn, PR_TRUE); /* Now write the signed data to the output file. */ - PR_Close (local_file_fd); + if(local_file_fd != NULL) + PR_Close (local_file_fd); local_file_fd = PR_Open (outputName.c_str(), PR_WRONLY | PR_CREATE_FILE | PR_TRUNCATE, PR_IRUSR | PR_IWUSR | PR_IRGRP | PR_IWGRP | PR_IROTH); if (local_file_fd == NULL) -- 2.43.5