On (21/10/13 11:03), Jakub Hrozek wrote:
>Another small bug I found when looking for #1020945

>From b1d04686f085e25f10dde82f1e19c89278883001 Mon Sep 17 00:00:00 2001
>From: Jakub Hrozek <jhro...@redhat.com>
>Date: Sun, 20 Oct 2013 19:24:04 +0200
>Subject: [PATCH] NSS: Check allocation result
>
>---
> src/responder/nss/nsssrv_cmd.c | 2 ++
> 1 file changed, 2 insertions(+)
>
>diff --git a/src/responder/nss/nsssrv_cmd.c b/src/responder/nss/nsssrv_cmd.c
>index 
>d37b4707cb734375011650632bca6d429042038c..a1938b2fc8d0a88460027d5f0d400f840fade02b
> 100644
>--- a/src/responder/nss/nsssrv_cmd.c
>+++ b/src/responder/nss/nsssrv_cmd.c
>@@ -320,6 +320,7 @@ static int fill_pwent(struct sss_packet *packet,
>     for (i = 0; i < *count; i++) {
>         talloc_zfree(tmp_ctx);
>         tmp_ctx = talloc_new(NULL);
>+        if (tmp_ctx == NULL) return ENOMEM;
> 
>         msg = msgs[i];
> 
>@@ -2325,6 +2326,7 @@ static int fill_grent(struct sss_packet *packet,
>     for (i = 0; i < *count; i++) {
>         talloc_zfree(tmp_ctx);
>         tmp_ctx = talloc_new(NULL);
>+        if (tmp_ctx == NULL) return ENOMEM;
>         msg = msgs[i];
> 
>         /* new group */
>-- 
>1.8.3.1
>

Similar problem is in the function nss_update_initgr_memcache

LS
_______________________________________________
sssd-devel mailing list
sssd-devel@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/sssd-devel

Reply via email to