1
0
mirror of https://github.com/samba-team/samba.git synced 2025-07-31 20:22:15 +03:00

freeing the wrong pointer, sorry my mistake.

(This used to be commit ce7e89949a)
This commit is contained in:
Simo Sorce
2001-12-30 22:55:04 +00:00
parent a4c612078f
commit 78528b4ec6

View File

@ -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;
}