Skip to content

Commit

Permalink
nx-match: Avoid null pointer dereference in nx_pull_header__() error …
Browse files Browse the repository at this point in the history
…case.

Found by LLVM scan-build.

Reported-by: Kevin Lo <[email protected]>
Signed-off-by: Ben Pfaff <[email protected]>
Acked-by: Jarno Rajahalme <[email protected]>
  • Loading branch information
blp committed Apr 17, 2015
1 parent 255a54e commit 38221f4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/nx-match.c
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,9 @@ nx_pull_header__(struct ofpbuf *b, bool allow_cookie, uint64_t *header,
b->size);
error:
*header = 0;
*field = NULL;
if (field) {
*field = NULL;
}
return OFPERR_OFPBMC_BAD_LEN;
}

Expand Down

0 comments on commit 38221f4

Please sign in to comment.