@jthiltges commented on this pull request.


In src/XrdTls/XrdTlsTempCA.cc:

> @@ -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, view it on GitHub, or unsubscribe.

[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/xrootd/xrootd/pull/1447#discussion_r619264152", "url": "https://github.com/xrootd/xrootd/pull/1447#discussion_r619264152", "name": "View Pull Request" }, "description": "View this Pull Request on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]

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