summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/charcnv.c8
-rw-r--r--source3/lib/system_smbd.c5
2 files changed, 7 insertions, 6 deletions
diff --git a/source3/lib/charcnv.c b/source3/lib/charcnv.c
index 03337cbf26..cd8aa4fe55 100644
--- a/source3/lib/charcnv.c
+++ b/source3/lib/charcnv.c
@@ -434,12 +434,12 @@ int push_ucs2(const void *base_ptr, void *dest, const char *src, int dest_len, i
* @retval The number of bytes occupied by the string in the destination
* or -1 in case of error.
**/
-int push_ucs2_talloc(TALLOC_CTX *ctx, void **dest, const char *src)
+int push_ucs2_talloc(TALLOC_CTX *ctx, smb_ucs2_t **dest, const char *src)
{
int src_len = strlen(src)+1;
*dest = NULL;
- return convert_string_talloc(ctx, CH_UNIX, CH_UCS2, src, src_len, dest);
+ return convert_string_talloc(ctx, CH_UNIX, CH_UCS2, src, src_len, (void **)dest);
}
/**
@@ -450,12 +450,12 @@ int push_ucs2_talloc(TALLOC_CTX *ctx, void **dest, const char *src)
* @retval The number of bytes occupied by the string in the destination
* or -1 in case of error.
**/
-int push_ucs2_allocate(void **dest, const char *src)
+int push_ucs2_allocate(smb_ucs2_t **dest, const char *src)
{
int src_len = strlen(src)+1;
*dest = NULL;
- return convert_string_allocate(CH_UNIX, CH_UCS2, src, src_len, dest);
+ return convert_string_allocate(CH_UNIX, CH_UCS2, src, src_len, (void **)dest);
}
/****************************************************************************
diff --git a/source3/lib/system_smbd.c b/source3/lib/system_smbd.c
index 5eda37d903..0cd3086945 100644
--- a/source3/lib/system_smbd.c
+++ b/source3/lib/system_smbd.c
@@ -61,13 +61,14 @@ static int getgrouplist_internals(const char *user, gid_t gid, gid_t *groups, in
ngrp_saved = getgroups(ngrp_saved, gids_saved);
if (ngrp_saved == -1) {
- free(gids_saved);
+ SAFE_FREE(gids_saved);
/* very strange! */
return -1;
}
if (initgroups(user, gid) != 0) {
- free(gids_saved);
+ DEBUG(0, ("getgrouplist_internals: initgroups() failed!\n"));
+ SAFE_FREE(gids_saved);
return -1;
}