From 7cca50e9b5842f0147e551640de37882974f4eaf Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Thu, 3 Nov 2011 10:05:21 -0400 Subject: Fix CID 10743: Unchecked return value https://fedorahosted.org/freeipa/ticket/2036 --- daemons/ipa-slapi-plugins/ipa-pwd-extop/ipa_pwd_extop.c | 10 ++++++++-- 1 file 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 95ac68e9..a0f9c5e1 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); -- cgit