Hello. Merry Christmas.
I worked on your idea to use stat(). Thanks a lot. That was really helpful.
There is one another thing apart from this patch. I did this -
valgrind --leak-check=yes ./nano dir/new_file
There were 58 bytes were reported as 'definitely lost' and I also did this -
valgrind --leak-check=yes ./nano dir/dir2/new_file
There were 73 bytes were reported as 'definitely lost'. Could this be troublesome? It helped remotely to solve a mistake I was making while building the patch. These command were executed over altered version on nano but it pointed code where I haven't made any changes.
And... last mail was reinvigorating, especially in despair.