summaryrefslogtreecommitdiff
path: root/source/libsmb/unexpected.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/libsmb/unexpected.c')
-rw-r--r--source/libsmb/unexpected.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/libsmb/unexpected.c b/source/libsmb/unexpected.c
index df4d2119e2..4404b26ccb 100644
--- a/source/libsmb/unexpected.c
+++ b/source/libsmb/unexpected.c
@@ -163,6 +163,10 @@ static int traverse_match(TDB_CONTEXT *ttdb, TDB_DATA kbuf, TDB_DATA dbuf,
ip,
port);
+ if (!p) {
+ return 0;
+ }
+
if ((state->match_type == NMB_PACKET &&
p->packet.nmb.header.name_trn_id == state->match_id) ||
(state->match_type == DGRAM_PACKET &&