The branch, master has been updated
       via  08802db8dbbbf842b7c006e5ff57ba1c2d0d6439 (commit)
      from  734647bd85560ed02691d79c0a613543043d8625 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 08802db8dbbbf842b7c006e5ff57ba1c2d0d6439
Author: Jeremy Allison <[email protected]>
Date:   Thu Jan 29 17:31:12 2009 -0800

    Fix coverity CID#116. Resource leak on error path.
    Jeremy.

-----------------------------------------------------------------------

Summary of changes:
 source3/libnet/libnet_samsync_ldif.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/libnet/libnet_samsync_ldif.c 
b/source3/libnet/libnet_samsync_ldif.c
index 4286331..cee0e17 100644
--- a/source3/libnet/libnet_samsync_ldif.c
+++ b/source3/libnet/libnet_samsync_ldif.c
@@ -542,8 +542,10 @@ static NTSTATUS fetch_group_info_to_ldif(TALLOC_CTX 
*mem_ctx,
        groupmap->sambaSID      = talloc_asprintf(mem_ctx, "%s-%d", sid, g_rid);
        groupmap->group_dn      = talloc_asprintf(mem_ctx,
             "cn=%s,ou=%s,%s", groupname, group_attr, suffix);
-       NT_STATUS_HAVE_NO_MEMORY(groupmap->sambaSID);
-       NT_STATUS_HAVE_NO_MEMORY(groupmap->group_dn);
+       if (groupmap->sambaSID == NULL || groupmap->group_dn == NULL) {
+               SAFE_FREE(group_attr);
+               return NT_STATUS_NO_MEMORY;
+       }
 
        /* Write the data to the temporary add ldif file */
        fprintf(add_fd, "# %s, %s, %s\n", groupname, group_attr,


-- 
Samba Shared Repository

Reply via email to