1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-22 05:57:43 +03:00

Follow herb's suggestion and don't strdup a string to itself.

This commit is contained in:
Andrew Bartlett -
parent 692c23fe86
commit ea76a687fc

View File

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