git.samba.org
/
ira
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
50b94ee
)
Follow herb's suggestion and don't strdup a string to itself.
author
Andrew Bartlett
<abartlet@samba.org>
Wed, 5 Dec 2001 01:58:33 +0000
(
01:58
+0000)
committer
Andrew Bartlett
<abartlet@samba.org>
Wed, 5 Dec 2001 01:58:33 +0000
(
01:58
+0000)
(This used to be commit
ea76a687fc2614912fd6b0458622495f9920749e
)
source3/utils/net_ads.c
patch
|
blob
|
history
diff --git
a/source3/utils/net_ads.c
b/source3/utils/net_ads.c
index 1bfd5c637a8d18287a9d0ccf9a8759967c24368f..a1ea063b208c626bec633bf59c8eba8c2e1ab101 100644
(file)
--- a/
source3/utils/net_ads.c
+++ b/
source3/utils/net_ads.c
@@
-156,6
+156,7
@@
static int net_ads_join(int argc, const char **argv)
ADS_STRUCT *ads;
int rc;
char *password;
+ char *tmp_password;
extern pstring global_myname;
NTSTATUS status;
@@
-163,9
+164,10
@@
static int net_ads_join(int argc, const char **argv)
DEBUG(1,("Failed to initialise secrets database\n"));
return -1;
}
-
- password = generate_random_str(15);
- password = strdup(password);
+
+
+ tmp_password = generate_random_str(15);
+ password = strdup(tmp_password);
if (!(ads = ads_startup())) return -1;