Page MenuHomeFreeBSD

D45147.id.diff
No OneTemporary

D45147.id.diff

diff --git a/usr.bin/sockstat/sockstat.c b/usr.bin/sockstat/sockstat.c
--- a/usr.bin/sockstat/sockstat.c
+++ b/usr.bin/sockstat/sockstat.c
@@ -1164,8 +1164,14 @@
f = RB_FIND(files_t, &ftree,
&(struct file){ .xf_data =
p->socket });
- pos += xprintf("[%lu %d]",
- (u_long)f->xf_pid, f->xf_fd);
+ if (__predict_false(f == NULL))
+ /* Known to happen when a dgram
+ * socket is open in the kernel,
+ * gssd.sock for example */
+ pos += xprintf("??");
+ else
+ pos += xprintf("[%lu %d]",
+ (u_long)f->xf_pid, f->xf_fd);
} else
pos += printaddr(&p->laddr->address);
}

File Metadata

Mime Type
text/plain
Expires
Sun, Apr 12, 10:24 PM (8 h, 2 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31376026
Default Alt Text
D45147.id.diff (661 B)

Event Timeline