Pārlūkot izejas kodu

Correctly handle dir connections the close during the pir lookup process

Ian Goldberg 5 gadi atpakaļ
vecāks
revīzija
8957e5abcb
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1 1
      src/feature/hs/hs_pirprocess.c

+ 1 - 1
src/feature/hs/hs_pirprocess.c

@@ -431,5 +431,5 @@ hs_pirprocess_lookup_reqid(uint64_t reqid)
     memset(mapbuf, 0, DIGEST_LEN);
     memmove(mapbuf, &reqid, sizeof(reqid));
     entry = digestmap_get(pirprocess_reqid_map, mapbuf);
-    return entry->conn;
+    return entry ? entry->conn : NULL;
 }