[Date Prev][Date Next]
Bug Fix HAVE_SLP NULL pointer check (ITS#2442)
Full_Name: Johnny Casey
OS: Linux (Debian unstable)
Submission from: (NULL) (184.108.40.206)
The code enabled by HAVE_SLP doesn't test for a NULL pointer in the
"slapd_srvurls" global variable. This causes a SEGFAULT on daemon close,
especially when "slapd -t" is run. The "slapd_slp_deinit()" function checks
that the "slapd_srvurls" variable is NULL, however neither "slapd_slp_dereg()"
nor "slapd_slp_reg()" do. Instead they immediately dereference the variable in
a loop test.
This may or not have shown up if a SLP service is actually running in which case
the variable is likely to be non-NULL.
The attached patch is fairly trivial, just adding NULL checks to the two above