summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStef Walter <stef@memberwebs.com>2008-06-21 00:26:32 +0000
committerStef Walter <stef@memberwebs.com>2008-06-21 00:26:32 +0000
commita998aa9a2e3a1f1f4994b47ea78fdf8883c5917a (patch)
tree0a3f101367dcea1afa7e713f0f233f30de218bf2
parent98c966c18e46deea5e16e06f7adf7e73c3496627 (diff)
Double check that attributes are non null.
-rw-r--r--plugin/autoserial.c3
-rw-r--r--plugin/dnsnotify.c4
2 files changed, 4 insertions, 3 deletions
diff --git a/plugin/autoserial.c b/plugin/autoserial.c
index b9fdeeb..15083ce 100644
--- a/plugin/autoserial.c
+++ b/plugin/autoserial.c
@@ -490,7 +490,8 @@ autoserial_post_modify (const char *dn, LDAPMod **mods)
if (soa_dn) {
for (m = mods; *m; ++m) {
mod = *m;
- if (strcasecmp (mod->mod_type, dnsserial_soa_attribute) == 0) {
+ if (mod->mod_type &&
+ strcasecmp (mod->mod_type, dnsserial_soa_attribute) == 0) {
slapi_ch_free_string (&soa_dn);
soa_dn = NULL;
break;
diff --git a/plugin/dnsnotify.c b/plugin/dnsnotify.c
index 61c8efa..c24b90c 100644
--- a/plugin/dnsnotify.c
+++ b/plugin/dnsnotify.c
@@ -300,8 +300,8 @@ dnsnotify_post_modify (const char *dn, LDAPMod **mods)
for (m = mods; *m; ++m) {
mod = *m;
- trace (mod->mod_type);
- if (strcasecmp (mod->mod_type, dnsnotify_soa_attribute) == 0) {
+ if (mod->mod_type &&
+ strcasecmp (mod->mod_type, dnsnotify_soa_attribute) == 0) {
if (load_zone_attributes (dn, &zone, &ns)) {
notify_dns_slaves (zone, ns);
slapi_ch_array_free (ns);