From: Lukas Berk Date: Wed, 11 May 2011 17:30:27 +0000 (-0400) Subject: Add NULL check to second PR_Close(local_file_fd) X-Git-Tag: release-1.5~54^2~1 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=93ea565accc8533eebac373e846d5d4e238f11ea;p=systemtap.git Add NULL check to second PR_Close(local_file_fd) --- 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)