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;