diff options
author | Simo Sorce <idra@samba.org> | 2001-12-30 22:55:04 +0000 |
---|---|---|
committer | Simo Sorce <idra@samba.org> | 2001-12-30 22:55:04 +0000 |
commit | 78528b4ec6cb675bfb81a1b8c1b7e62ae19db8ef (patch) | |
tree | 6cf5a4684a179e5378f1775f6b587264286e8e8f /source3/lib | |
parent | a4c612078fa85b5bd1e2f5dba19304b63b2b2a78 (diff) | |
download | samba-78528b4ec6cb675bfb81a1b8c1b7e62ae19db8ef.tar.gz samba-78528b4ec6cb675bfb81a1b8c1b7e62ae19db8ef.tar.bz2 samba-78528b4ec6cb675bfb81a1b8c1b7e62ae19db8ef.zip |
freeing the wrong pointer, sorry my mistake.
(This used to be commit ce7e89949ae1755f9faa008784a5b1a9b137945e)
Diffstat (limited to 'source3/lib')
-rw-r--r-- | source3/lib/util_sid.c | 10 |
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; } |