From f908514095d709c72eeee71f8220168318f163a4 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Sat, 12 Oct 2024 17:54:36 +0100 Subject: [PATCH] Zero errno before calling popen. --- src/mail.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mail.cpp b/src/mail.cpp index 172b7a5fe..6b543e85e 100644 --- a/src/mail.cpp +++ b/src/mail.cpp @@ -36,6 +36,7 @@ Mail::Message::~Message() void Mail::Message::Run() { + errno = 0; auto *pipe = popen(sendmail_path.c_str(), "w"); if (!pipe) {