diff --git a/glnx-fdio.c b/glnx-fdio.c index 62371d02..cdbb69fe 100644 --- a/glnx-fdio.c +++ b/glnx-fdio.c @@ -746,6 +746,8 @@ glnx_file_replace_contents_with_perms_at (int dfd, ret = TRUE; out: + if (!ret) + (void) unlink (tmppath); return ret; }