Print

Print


@jthiltges commented on this pull request.



> @@ -100,10 +100,10 @@ CASet::processFile(file_smart_ptr &fp, const std::string &fname)
     XrdCryptosslX509ParseFile(fp.get(), &chain, fname.c_str());
 
     auto ca = chain.Begin();
-    // Note we purposely leak the outputfp here; we are just borrowing the handle.
-    FILE *outputfp = fdopen(m_output_fd, "w");
-    if (!outputfp) {
+    file_smart_ptr outputfp(fdopen(dup(m_output_fd), "w"), &fclose);

Good idea, thank you!

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/xrootd/xrootd/pull/1447#discussion_r619264152

########################################################################
Use REPLY-ALL to reply to list

To unsubscribe from the XROOTD-DEV list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=XROOTD-DEV&A=1