]> git.ipfire.org Git - thirdparty/pdns.git/blobdiff - pdns/misc.hh
FDWrapper: Always reset the internal descriptor to -1
[thirdparty/pdns.git] / pdns / misc.hh
index 61116f20ab8f62f3ead33b0b7f5c3e65907028a0..e9a0dad36a221b5a202e60dfad33ea893e996168 100644 (file)
@@ -826,8 +826,8 @@ struct FDWrapper
     int ret = 0;
     if (d_fd >= 0) {
       ret = close(d_fd);
-      d_fd = -1;
     }
+    d_fd = -1;
     return ret;
   }