Unverified Commit fa2b2c21 authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

add_stdin_to_filelist: fix resource leak upon fwrite failure

Closes #730
parent b86f22bb
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -180,6 +180,7 @@ static void add_stdin_to_filelist(void)
	while ((readsize = fread(buf, sizeof(char), sizeof(buf), stdin)) > 0) {
		if (fwrite(buf, sizeof(char), readsize, outfile) < readsize) {
			free(sfn);
			fclose(outfile);
			return;
		}
	}