* Malaya Kumar Rout malayarout91@gmail.com wrote:
@@ -1189,9 +1191,10 @@ void *allocate_dsa_pasid(void) wq = mmap(NULL, 0x1000, PROT_WRITE, MAP_SHARED | MAP_POPULATE, fd, 0);
- if (wq == MAP_FAILED)
- if (wq == MAP_FAILED){
perror("mmap");close(fd);
We should unconditionally close 'fd' after the mmap() call, not just in the perror() branch.
Thanks,
Ingo