Skip to content

Commit c5a97a1

Browse files
committed
Try to fix another memory related error
Update aspectator submodule
1 parent c7ee597 commit c5a97a1

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

cif.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,10 +335,15 @@ static void parse_opts(int argc, char **argv) {
335335
aspectator_path[len] = '\0';
336336
#endif
337337

338-
aspectator_path = dirname(aspectator_path);
338+
char *aspectator_dir= strdup(aspectator_path);
339+
aspectator_dir = dirname(aspectator_dir);
340+
341+
aspectator_path[0] = 0;
342+
strcpy(aspectator_path, aspectator_dir);
339343
strcat(aspectator_path, "/aspectator");
340344

341345
opts.aspectator = strdup(aspectator_path);
346+
free(aspectator_dir);
342347
free(aspectator_path);
343348

344349
print_debug(DEBUG, "Default aspectator '%s' will be used.\n", opts.aspectator);

0 commit comments

Comments
 (0)