]> sourceware.org Git - systemtap.git/commitdiff
Add NULL check to second PR_Close(local_file_fd)
authorLukas Berk <lberk@redhat.com>
Wed, 11 May 2011 17:30:27 +0000 (13:30 -0400)
committerLukas Berk <lberk@redhat.com>
Wed, 11 May 2011 17:30:27 +0000 (13:30 -0400)
nsscommon.cxx

index 40b6333921ed8524c7846f0b825f67586d94cbb0..6de46e8585a54459b535049fea88473eda0f4378 100644 (file)
@@ -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)
This page took 0.026333 seconds and 5 git commands to generate.