summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim McDonough <jmcd@samba.org>2006-03-10 14:17:44 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:15:14 -0500
commit49dec1cac6defdfb0ab9a15ab274a4a233b44e45 (patch)
tree76258ead40d11ad31cb5270a5b1031f86d2c7d54
parentc53c08ef866fd61fe3fa79bfaf3e9dc6b5aab4ae (diff)
downloadsamba-49dec1cac6defdfb0ab9a15ab274a4a233b44e45.tar.gz
samba-49dec1cac6defdfb0ab9a15ab274a4a233b44e45.tar.bz2
samba-49dec1cac6defdfb0ab9a15ab274a4a233b44e45.zip
r14153: Fix coverity #116: free storage alloc'ed by sstring_sub()
(This used to be commit dbc0ff5544f2d15b1d1bc41319c76274b79d92b4)
-rw-r--r--source3/utils/net_rpc_samsync.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source3/utils/net_rpc_samsync.c b/source3/utils/net_rpc_samsync.c
index b056d170d6..a171782c48 100644
--- a/source3/utils/net_rpc_samsync.c
+++ b/source3/utils/net_rpc_samsync.c
@@ -1412,6 +1412,7 @@ static NTSTATUS fetch_group_info_to_ldif(SAM_DELTA_CTR *delta, GROUPMAP *groupma
strcmp(groupname, "Print Operators") == 0 ||
strcmp(groupname, "Backup Operators") == 0 ||
strcmp(groupname, "Replicators") == 0) {
+ SAFE_FREE(group_attr);
return NT_STATUS_OK;
} else {
/* Increment the gid for the new group */
@@ -1441,6 +1442,7 @@ static NTSTATUS fetch_group_info_to_ldif(SAM_DELTA_CTR *delta, GROUPMAP *groupma
fprintf(add_fd, "\n");
fflush(add_fd);
+ SAFE_FREE(group_attr);
/* Return */
return NT_STATUS_OK;
}