about summary refs log tree commit diff
path: root/src/libstore/local-store.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstore/local-store.cc')
-rw-r--r--src/libstore/local-store.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/libstore/local-store.cc b/src/libstore/local-store.cc
index f08c877fe3d7..fc48c0405650 100644
--- a/src/libstore/local-store.cc
+++ b/src/libstore/local-store.cc
@@ -363,6 +363,15 @@ LocalStore::~LocalStore()
     } catch (...) {
         ignoreException();
     }
+
+    try {
+        if (fdTempRoots != -1) {
+            fdTempRoots.close();
+            unlink(fnTempRoots.c_str());
+        }
+    } catch (...) {
+        ignoreException();
+    }
 }