summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2015-09-03 11:19:51 -0700
committerGuy Harris <guy@alum.mit.edu>2015-09-05 14:23:38 -0700
commit734d0e2e532ea105033c32382c6c5199e484900e (patch)
tree8ff0dd32049dd66be18951f20e0f5286b4baf77d
parentde0e1a3f348217b16fe384fa481d8b8d64f2c2bb (diff)
downloadlibpcap-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.c2
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;