summaryrefslogtreecommitdiffstats
path: root/src/providers
diff options
context:
space:
mode:
authorLukas Slebodnik <lslebodn@redhat.com>2014-10-11 11:09:49 +0200
committerJakub Hrozek <jhrozek@redhat.com>2014-10-12 17:25:51 +0200
commit210e57203a1502f78a16b05010d52c9121b644e3 (patch)
tree616785bcf078d7ddac35d1bac0486e183c6727dd /src/providers
parent609dca68b387ed6646f374545d381ca2ab8ff50a (diff)
downloadsssd-210e57203a1502f78a16b05010d52c9121b644e3.tar.gz
sssd-210e57203a1502f78a16b05010d52c9121b644e3.tar.xz
sssd-210e57203a1502f78a16b05010d52c9121b644e3.zip
IPA: Fix error handling after talloc_ber_flatten
The function talloc_ber_flatten can return EFAULT, ENOMEM, EOK. But it was tested for -1. Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
Diffstat (limited to 'src/providers')
-rw-r--r--src/providers/ipa/ipa_s2n_exop.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/providers/ipa/ipa_s2n_exop.c b/src/providers/ipa/ipa_s2n_exop.c
index 76494a031..148778918 100644
--- a/src/providers/ipa/ipa_s2n_exop.c
+++ b/src/providers/ipa/ipa_s2n_exop.c
@@ -359,8 +359,7 @@ static errno_t s2n_encode_request(TALLOC_CTX *mem_ctx,
}
ret = talloc_ber_flatten(mem_ctx, ber, _bv);
- if (ret == -1) {
- ret = EFAULT;
+ if (ret != EOK) {
goto done;
}