Original code for 9.6:
if (parse_credentialfiles(value, &(host->auth_method), &pwd, &grp) == 0) {
if (pwd != NULL) {
if (register_tempdata(tempdata, pwd, tc_data) == -1) {
free(pwd);
if (grp != NULL) {
free(grp);
}
return false;
}
host->passwordfile = pwd;
}
if (grp != NULL) {
if (register_tempdata(tempdata, grp, tc_data) == -1) {
free(grp);
return false;
}
host->groupfile = grp;
}
return true;
}
And then modified to:
if (parse_credentialfiles(value, &(host->auth_method), &pwd, &grp) == 0) {
if (pwd != NULL) {
if (register_tempdata(tempdata, pwd, tc_data) == -1) {
free(pwd);
if (grp != NULL) {
free(grp);
}
return false;
}
}
host->passwordfile = pwd;
if (grp != NULL) {
if (register_tempdata(tempdata, grp, tc_data) == -1) {
free(grp);
return false;
}
}
host->groupfile = grp;
return true;
}
Right?