diff options
author | Toomas Soome <tsoome@me.com> | 2019-01-22 19:15:45 +0200 |
---|---|---|
committer | Toomas Soome <tsoome@me.com> | 2019-07-03 10:29:11 +0300 |
commit | 51b02b292e47be2588e43efa7cff6e9fc931fba0 (patch) | |
tree | f8851fde561a9e31c9c70617c057c2bdf4f659f6 /usr/src/lib/libsldap/common/ns_writes.c | |
parent | 563485af1b25ed721b3a7a25a0c9153999957f71 (diff) | |
download | illumos-gate-51b02b292e47be2588e43efa7cff6e9fc931fba0.tar.gz |
11167 libsldap: NULL pointer errors
Reviewed by: John Levon <john.levon@joyent.com>
Approved by: Richard Lowe <richlowe@richlowe.net>
Diffstat (limited to 'usr/src/lib/libsldap/common/ns_writes.c')
-rw-r--r-- | usr/src/lib/libsldap/common/ns_writes.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/usr/src/lib/libsldap/common/ns_writes.c b/usr/src/lib/libsldap/common/ns_writes.c index 5029598f19..0774eb7524 100644 --- a/usr/src/lib/libsldap/common/ns_writes.c +++ b/usr/src/lib/libsldap/common/ns_writes.c @@ -1066,9 +1066,10 @@ write_state_machine( err = strdup(errstr); if (pwd_status != NS_PASSWD_GOOD) { MKERROR_PWD_MGMT(*errorp, Errno, err, - pwd_status, 0, NULL); + pwd_status, 0, NS_LDAP_MEMORY); } else { - MKERROR(LOG_INFO, *errorp, Errno, err, NULL); + MKERROR(LOG_INFO, *errorp, Errno, err, + NS_LDAP_MEMORY); } if (conn_user != NULL && (Errno == LDAP_SERVER_DOWN || @@ -1085,7 +1086,8 @@ write_state_machine( " (state = %d, rc = %d)."), err_state, return_rc); err = strdup(errstr); - MKERROR(LOG_WARNING, *errorp, return_rc, err, NULL); + MKERROR(LOG_WARNING, *errorp, return_rc, err, + NS_LDAP_MEMORY); new_state = W_EXIT; break; } @@ -2854,7 +2856,7 @@ modify_ethers_bootp( new_attrlist[0]->attrname = "objectclass"; new_attrlist[0]->value_count = 1; - if (strcasecmp(service, "ethers") == NULL) { + if (strcasecmp(service, "ethers") == 0) { (void) snprintf(&filter[0], sizeof (filter), "(&(objectClass=ieee802Device)(%s))", rdn); new_attrlist[0]->attrvalue[0] = "ieee802Device"; @@ -4133,7 +4135,7 @@ send_to_cachemgr( "ldap_cachemgr failed - error: %d"), space.s_d.ldap_ret.ldap_errno); MKERROR(LOG_WARNING, *errorp, NS_CONFIG_CACHEMGR, - strdup(errstr), NULL); + strdup(errstr), NS_LDAP_MEMORY); return (NS_LDAP_OP_FAILED); default: return (NS_LDAP_OP_FAILED); |