diff options
author | Simo Sorce <ssorce@redhat.com> | 2011-11-03 10:05:21 -0400 |
---|---|---|
committer | Simo Sorce <ssorce@redhat.com> | 2011-11-07 11:13:55 -0500 |
commit | 7cca50e9b5842f0147e551640de37882974f4eaf (patch) | |
tree | 96e88cfab1edf559a4adb3903af9cd25d074b5f6 /daemons/ipa-slapi-plugins/ipa-pwd-extop | |
parent | e615bea1beebe9d17993d6ef0d32060289420c60 (diff) | |
download | freeipa-7cca50e9b5842f0147e551640de37882974f4eaf.tar.gz freeipa-7cca50e9b5842f0147e551640de37882974f4eaf.tar.xz freeipa-7cca50e9b5842f0147e551640de37882974f4eaf.zip |
Fix CID 10743: Unchecked return value
https://fedorahosted.org/freeipa/ticket/2036
Diffstat (limited to 'daemons/ipa-slapi-plugins/ipa-pwd-extop')
-rw-r--r-- | daemons/ipa-slapi-plugins/ipa-pwd-extop/ipa_pwd_extop.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/daemons/ipa-slapi-plugins/ipa-pwd-extop/ipa_pwd_extop.c b/daemons/ipa-slapi-plugins/ipa-pwd-extop/ipa_pwd_extop.c index 95ac68e9c..a0f9c5e14 100644 --- a/daemons/ipa-slapi-plugins/ipa-pwd-extop/ipa_pwd_extop.c +++ b/daemons/ipa-slapi-plugins/ipa-pwd-extop/ipa_pwd_extop.c @@ -504,9 +504,15 @@ free_and_return: /* Either this is the same pointer that we allocated and set above, * or whoever used it should have freed it and allocated a new * value that we need to free here */ - slapi_pblock_get(pb, SLAPI_ORIGINAL_TARGET, &dn); + ret = slapi_pblock_get(pb, SLAPI_ORIGINAL_TARGET, &dn); + if (ret) { + LOG_TRACE("Failed to get SLAPI_ORIGINAL_TARGET\n"); + } slapi_ch_free_string(&dn); - slapi_pblock_set(pb, SLAPI_ORIGINAL_TARGET, NULL); + ret = slapi_pblock_set(pb, SLAPI_ORIGINAL_TARGET, NULL); + if (ret) { + LOG_TRACE("Failed to clear SLAPI_ORIGINAL_TARGET\n"); + } slapi_ch_free_string(&authmethod); slapi_ch_free_string(&principal); |