[SSSD] [PATCH] LDAP: end on ENOMEM

Jakub Hrozek jhrozek at redhat.com
Mon Aug 31 16:37:26 UTC 2015


On Mon, Aug 24, 2015 at 01:19:00PM +0200, Pavel Březina wrote:
> On 08/24/2015 01:11 PM, Pavel Reichl wrote:
> >Hello,
> >
> >please see trivial patch fixing coverity warning.
> >
> >Thanks!
> >
> >0001-LDAP-end-on-ENOMEM.patch
> >
> >
> > From 69c20ca306827a558d6be015d0d060f9f46423f8 Mon Sep 17 00:00:00 2001
> >From: Pavel Reichl<preichl at redhat.com>
> >Date: Mon, 24 Aug 2015 07:05:00 -0400
> >Subject: [PATCH] LDAP: end on ENOMEM
> >
> >---
> >  src/providers/ldap/ldap_id_cleanup.c | 1 +
> >  1 file changed, 1 insertion(+)
> >
> >diff --git a/src/providers/ldap/ldap_id_cleanup.c b/src/providers/ldap/ldap_id_cleanup.c
> >index 0a2b23297f5feaee30b75b31a9b2fd9a0a2a6f23..0cbcf04791abe701d335523302e5c1f1afacc716 100644
> >--- a/src/providers/ldap/ldap_id_cleanup.c
> >+++ b/src/providers/ldap/ldap_id_cleanup.c
> >@@ -466,6 +466,7 @@ get_group_dn_with_filter_sanitized_name(TALLOC_CTX *mem_ctx,
> >      tmp_ctx = talloc_new(NULL);
> >      if (tmp_ctx == NULL) {
> >          ret = ENOMEM;
> >+        goto done;
> 
> We usually use return ENOMEM in this case. But this works as well and it may
> be even clearer. Ack.

* master: f31a57321fc0a2390bb0d6030053c49787e5e587


More information about the sssd-devel mailing list