git.samba.org
/
metze
/
samba
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
77bac5b
)
Fix coverity CID#115. Resource leak in error path.
author
Jeremy Allison
<jra@samba.org>
Fri, 30 Jan 2009 01:27:47 +0000
(17:27 -0800)
committer
Jeremy Allison
<jra@samba.org>
Fri, 30 Jan 2009 01:27:47 +0000
(17:27 -0800)
Jeremy.
source3/libnet/libnet_samsync_ldif.c
patch
|
blob
|
history
diff --git
a/source3/libnet/libnet_samsync_ldif.c
b/source3/libnet/libnet_samsync_ldif.c
index 3068f8d3ebc9bf4e704503a8a9624d8b21883ae8..4286331893575959c8e5d66586d39f855bca4115 100644
(file)
--- a/
source3/libnet/libnet_samsync_ldif.c
+++ b/
source3/libnet/libnet_samsync_ldif.c
@@
-776,7
+776,10
@@
static NTSTATUS fetch_alias_info_to_ldif(TALLOC_CTX *mem_ctx,
g_rid = r->rid;
groupmap->gidNumber = ldif_gid;
groupmap->sambaSID = talloc_asprintf(mem_ctx, "%s-%d", sid, g_rid);
- NT_STATUS_HAVE_NO_MEMORY(groupmap->sambaSID);
+ if (groupmap->sambaSID == 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", aliasname, group_attr,