diff options
author | Guy Harris <guy@alum.mit.edu> | 2015-09-03 11:19:51 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2015-09-05 14:23:38 -0700 |
commit | 734d0e2e532ea105033c32382c6c5199e484900e (patch) | |
tree | 8ff0dd32049dd66be18951f20e0f5286b4baf77d | |
parent | de0e1a3f348217b16fe384fa481d8b8d64f2c2bb (diff) | |
download | libpcap-734d0e2e532ea105033c32382c6c5199e484900e.tar.gz |
Don't dereference a known-to-be-null pointer.
handlep->mondevice is null because strdup() failed; don't pass it to
del_mon_if(), pass what we tried to duplicate.
Fixes Coverity issue 1322848.
-rw-r--r-- | pcap-linux.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pcap-linux.c b/pcap-linux.c index 11cf8777..ad8eb7d7 100644 --- a/pcap-linux.c +++ b/pcap-linux.c @@ -765,7 +765,7 @@ add_mon_if(pcap_t *handle, int sock_fd, struct nl80211_state *state, /* * Get rid of the monitor device. */ - del_mon_if(handle, sock_fd, state, device, handlep->mondevice); + del_mon_if(handle, sock_fd, state, device, mondevice); return PCAP_ERROR; } return 1; |