From 6ff849f35ae3394d6557f79c73b0fe54fbb86d0f Mon Sep 17 00:00:00 2001 From: Jim McDonough Date: Fri, 10 Mar 2006 14:09:34 +0000 Subject: [PATCH] r14150: Fix coverity #118: not freeing alloc'ed storage returned from sstring_sub(). --- source/utils/net_rpc_samsync.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/utils/net_rpc_samsync.c b/source/utils/net_rpc_samsync.c index 5ee0b702781..2c2ffbe6f03 100644 --- a/source/utils/net_rpc_samsync.c +++ b/source/utils/net_rpc_samsync.c @@ -1309,7 +1309,9 @@ static NTSTATUS populate_ldap_for_ldif(fstring sid, const char *suffix, const ch fflush(add_fd); /* Deallocate memory, and return */ - if (suffix_attr != NULL) SAFE_FREE(suffix_attr); + SAFE_FREE(suffix_attr); + SAFE_FREE(user_attr); + SAFE_FREE(group_attr); return NT_STATUS_OK; }