Commit 46405777 authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

Merge branch 'segfaultScandirFree' of https://github.com/vorburger/feh into...

Merge branch 'segfaultScandirFree' of https://github.com/vorburger/feh into vorburger-segfaultScandirFree
parents 4b8d812d 5f210b5b
Loading
Loading
Loading
Loading
+19 −19
Original line number Diff line number Diff line
@@ -263,8 +263,7 @@ void add_file_to_filelist_recursively(char *origpath, unsigned char level)
			default:
				weprintf("Failed to scan directory %s:", path);
			}
		}

		} else {
			for (cnt = 0; cnt < n; cnt++) {
				if (strcmp(de[cnt]->d_name, ".")
						&& strcmp(de[cnt]->d_name, "..")) {
@@ -284,6 +283,7 @@ void add_file_to_filelist_recursively(char *origpath, unsigned char level)
				free(de[cnt]);
			}
			free(de);
		}
		closedir(dir);
	} else if (S_ISREG(st.st_mode)) {
		D(("Adding regular file %s to filelist\n", path));