size_t len = tstrlen(fs_source_path) +
tstrlen(wimboot_cfgfile);
- tmp_config_file = MALLOC((len + 1) * sizeof(tchar));
struct stat st;
+ tmp_config_file = MALLOC((len + 1) * sizeof(tchar));
+ if (!tmp_config_file)
+ return WIMLIB_ERR_NOMEM;
+
tsprintf(tmp_config_file, T("%"TS"%"TS),
fs_source_path, wimboot_cfgfile);
if (!tstat(tmp_config_file, &st)) {
out_destroy_config:
destroy_capture_config(&config);
out:
+ FREE(params.cur_path);
return ret;
}
}
#endif
-#ifdef __WIN32__
+#ifdef _WIN32
/* Check for flags not supported on Windows. */
if (add_flags & WIMLIB_ADD_FLAG_UNIX_DATA) {
ERROR("Capturing UNIX-specific data is not supported on Windows");