diff options
author | todd stecher <todd.stecher@gmail.com> | 2009-01-19 15:09:51 -0800 |
---|---|---|
committer | Steven Danneman <steven.danneman@isilon.com> | 2009-01-21 17:13:03 -0800 |
commit | 989ad44d32c2e77972a966d91f1813b0b929f83b (patch) | |
tree | bb7a41c961fe974f464f7ce2a27ca3bf055187bf /source3/utils | |
parent | e9615b43b4dc7037da7bc274d720b8e54c7f85bc (diff) | |
download | samba-989ad44d32c2e77972a966d91f1813b0b929f83b.tar.gz samba-989ad44d32c2e77972a966d91f1813b0b929f83b.tar.bz2 samba-989ad44d32c2e77972a966d91f1813b0b929f83b.zip |
Memory leaks and other fixes found by Coverity
Diffstat (limited to 'source3/utils')
-rw-r--r-- | source3/utils/net_rpc.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c index 652f0b531b..c000b58098 100644 --- a/source3/utils/net_rpc.c +++ b/source3/utils/net_rpc.c @@ -4064,7 +4064,11 @@ static bool get_user_sids(const char *domain, const char *user, NT_USER_TOKEN *t return false; } - string_to_sid(&user_sid, sid_str); + if (!string_to_sid(&user_sid, sid_str)) { + DEBUG(1,("Could not convert sid %s from string\n", sid_str)); + return false; + } + wbcFreeMemory(sid_str); sid_str = NULL; @@ -4200,7 +4204,11 @@ static bool get_user_tokens_from_file(FILE *f, /* We have a SID */ DOM_SID sid; - string_to_sid(&sid, &line[1]); + if(!string_to_sid(&sid, &line[1])) { + DEBUG(1,("get_user_tokens_from_file: Could " + "not convert sid %s \n",&line[1])); + return false; + } if (token == NULL) { DEBUG(0, ("File does not begin with username")); |