summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/lib/util_sid.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source3/lib/util_sid.c b/source3/lib/util_sid.c
index d35e8a8ac9..1a19d55830 100644
--- a/source3/lib/util_sid.c
+++ b/source3/lib/util_sid.c
@@ -375,7 +375,7 @@ const char *sid_string_static(DOM_SID *sid)
BOOL string_to_sid(DOM_SID *sidout, const char *sidstr)
{
pstring tok;
- char *p;
+ char *p, *q;
/* BIG NOTE: this function only does SIDS where the identauth is not >= 2^32 */
uint32 ia;
@@ -386,7 +386,7 @@ BOOL string_to_sid(DOM_SID *sidout, const char *sidstr)
memset((char *)sidout, '\0', sizeof(DOM_SID));
- p = strdup(sidstr + 2);
+ q = p = strdup(sidstr + 2);
if (p == NULL) {
DEBUG(0, ("string_to_sid: out of memory!\n"));
return False;
@@ -394,7 +394,7 @@ BOOL string_to_sid(DOM_SID *sidout, const char *sidstr)
if (!next_token(&p, tok, "-", sizeof(tok))) {
DEBUG(0,("string_to_sid: Sid %s is not in a valid format.\n", sidstr));
- SAFE_FREE(p);
+ SAFE_FREE(q);
return False;
}
@@ -403,7 +403,7 @@ BOOL string_to_sid(DOM_SID *sidout, const char *sidstr)
if (!next_token(&p, tok, "-", sizeof(tok))) {
DEBUG(0,("string_to_sid: Sid %s is not in a valid format.\n", sidstr));
- SAFE_FREE(p);
+ SAFE_FREE(q);
return False;
}
@@ -429,7 +429,7 @@ BOOL string_to_sid(DOM_SID *sidout, const char *sidstr)
sid_append_rid(sidout, (uint32)strtoul(tok, NULL, 10));
}
- SAFE_FREE(p);
+ SAFE_FREE(q);
return True;
}