Commit caa759be authored by Benno Schulenberg's avatar Benno Schulenberg
Browse files

Returning a fantastic file descriptor -- when opening

a non-existent file for reading succeeds.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5565 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
No related merge requests found
Showing with 3 additions and 1 deletion
+3 -1
2016-01-15 Benno Schulenberg <bensberg@justemail.net>
* src/winio.c (set_modified): Plug another memory leak.
* src/files.c (open_file): Return the fantastic file descriptor
when opening a non-existent file for reading succeeds.
2016-01-15 Mike Frysinger <vapier@gentoo.org>
* src/files.c (open_file): Free the full filename in all cases.
......
......@@ -933,7 +933,7 @@ int open_file(const char *filename, bool newfie, bool quiet, FILE **f)
if ((fd = open(filename, O_RDONLY)) != -1) {
if (!quiet)
statusbar(_("Reading File"));
return 0;
return fd;
}
if (newfie) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment