From 210e57203a1502f78a16b05010d52c9121b644e3 Mon Sep 17 00:00:00 2001 From: Lukas Slebodnik Date: Sat, 11 Oct 2014 11:09:49 +0200 Subject: 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 --- src/providers/ipa/ipa_s2n_exop.c | 3 +-- 1 file changed, 1 insertion(+), 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; } -- cgit