We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 451b365 + 65c4f64 commit 8d371ddCopy full SHA for 8d371dd
1 file changed
src/nvme/tree.c
@@ -152,9 +152,12 @@ int nvme_read_config(nvme_root_t r, const char *config_file)
152
return err;
153
}
154
155
+ r->config_file = strdup(config_file);
156
+ if (!r->config_file) {
157
+ errno = ENOMEM;
158
+ return err;
159
+ }
160
err = json_read_config(r, config_file);
- if (!err)
- r->config_file = strdup(config_file);
161
/*
162
* The json configuration file is optional,
163
* so ignore errors when opening the file.
0 commit comments