Commit 964e181b authored by Ian Bruene's avatar Ian Bruene Committed by Gary E. Miller
Browse files

Added NULL detector for pps_peer segfault.

parent 7fa9b38c
Pipeline #29168662 passed with stages
in 3 minutes and 30 seconds
......@@ -595,8 +595,11 @@ gpsd_shutdown(
if (up == NULL)
return;
/* now check if we must close IO resources */
if (pp != up->pps_peer->procptr) {
if (up->pps_peer == NULL) {
/* This is NULL if no related PPS */
DPRINT(1, ("%s: pps_peer found NULL", up->logname));
} else if (pp != up->pps_peer->procptr) {
/* now check if we must close IO resources */
if (-1 != pp->io.fd) {
DPRINT(1, ("%s: closing clock, fd=%d\n",
up->logname, pp->io.fd));
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment