} else if (strncmp(data, "secretfile", 10) == 0) {
if (!value || !*value) {
printf("keyword secretfile found, but no secret file specified\n");
+ free(saw_name);
return NULL;
}
}
/* take a copy of the name, to be used for
- naming the keys that we add to kernel;
- ignore memleak as mount.ceph is
- short-lived */
+ naming the keys that we add to kernel; */
+ free(saw_name);
saw_name = strdup(value);
if (!saw_name) {
printf("out of memory.\n");
char secret_option[MAX_SECRET_OPTION_LEN];
ret = get_secret_option(saw_secret, name, secret_option, sizeof(secret_option));
if (ret < 0) {
+ free(saw_name);
return NULL;
} else {
if (pos) {
}
}
+ free(saw_name);
if (!out)
return strdup(EMPTY_STRING);
return out;