File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -182,14 +182,20 @@ int test__attr(struct test *test __maybe_unused, int subtest __maybe_unused)
182
182
struct stat st ;
183
183
char path_perf [PATH_MAX ];
184
184
char path_dir [PATH_MAX ];
185
+ char * exec_path ;
185
186
186
187
/* First try development tree tests. */
187
188
if (!lstat ("./tests" , & st ))
188
189
return run_dir ("./tests" , "./perf" );
189
190
191
+ exec_path = get_argv_exec_path ();
192
+ if (exec_path == NULL )
193
+ return -1 ;
194
+
190
195
/* Then installed path. */
191
- snprintf (path_dir , PATH_MAX , "%s/tests" , get_argv_exec_path () );
196
+ snprintf (path_dir , PATH_MAX , "%s/tests" , exec_path );
192
197
snprintf (path_perf , PATH_MAX , "%s/perf" , BINDIR );
198
+ free (exec_path );
193
199
194
200
if (!lstat (path_dir , & st ) &&
195
201
!lstat (path_perf , & st ))
You can’t perform that action at this time.
0 commit comments