From 78528b4ec6cb675bfb81a1b8c1b7e62ae19db8ef Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Sun, 30 Dec 2001 22:55:04 +0000 Subject: freeing the wrong pointer, sorry my mistake. (This used to be commit ce7e89949ae1755f9faa008784a5b1a9b137945e) --- source3/lib/util_sid.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'source3/lib/util_sid.c') 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; } -- cgit