MXS-1929: Output const strings from serviceGetUser

The values aren't meant to be modified by the caller.
This commit is contained in:
Markus Mäkelä
2018-08-02 23:01:44 +03:00
parent 7d6338d65b
commit b20decfe1c
10 changed files with 60 additions and 67 deletions

View File

@ -167,10 +167,12 @@ int main(int argc, char **argv)
return 1;
}
const char* user;
const char* password;
serviceGetUser(service, &user, &password);
inst->service = service;
inst->user = MXS_STRDUP_A(service->credentials.name);
inst->password = MXS_STRDUP_A(service->credentials.authdata);
inst->user = MXS_STRDUP_A(user);
inst->password = MXS_STRDUP_A(password);
MXS_NOTICE("testbinlog v1.0");