From 6858a4751a5b19227af37cb44b1ed3505ef5a01d Mon Sep 17 00:00:00 2001 From: Fred Gleason Date: Thu, 11 Apr 2024 15:09:02 -0400 Subject: [PATCH] 2024-04-11 Fred Gleason * Fixed a bug in 'RDTempDirectory' that failed to remove a temporary directory after use. Signed-off-by: Fred Gleason --- ChangeLog | 3 +++ lib/rdformpost.cpp | 1 + 2 files changed, 4 insertions(+) diff --git a/ChangeLog b/ChangeLog index 7e2b9c55..e5f207c5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -24702,3 +24702,6 @@ 2024-04-06 Fred Gleason * Incremented the package version to 4.2.0 * Incremented the Python API version to 4.2.0. +2024-04-11 Fred Gleason + * Fixed a bug in 'RDTempDirectory' that failed to remove a temporary + directory after use. diff --git a/lib/rdformpost.cpp b/lib/rdformpost.cpp index 7d8e2b83..c8da5de4 100644 --- a/lib/rdformpost.cpp +++ b/lib/rdformpost.cpp @@ -105,6 +105,7 @@ RDFormPost::RDFormPost(RDFormPost::Encoding encoding,bool auto_delete) if((s=read(0,first,1))<=0) { post_error=RDFormPost::ErrorMalformedData; + delete post_tempdir; return; } post_bytes_downloaded+=1;