Skip to content
Snippets Groups Projects
Commit 0b49021a authored by Chris West (Faux)'s avatar Chris West (Faux)
Browse files

399ccdeb caused a crash on non-existent directories on the command line

parent 399ccdeb
Branches
Tags
No related merge requests found
......@@ -367,7 +367,7 @@ int calc_key(int ch) {
int calc_process() {
char *path, *name;
char *path = NULL, *name = NULL;
struct stat fs;
struct dir *t;
int n;
......@@ -494,7 +494,7 @@ int calc_process() {
/* something went wrong... */
freedir(root);
calc_fail:
if(!path[1] && strcmp(name, "."))
if(name && path && !path[1] && strcmp(name, "."))
free(name);
free(path);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment