comparison src/fileio.c @ 25321:2ad9fa0386b6

(Finsert_file_contents): Use xfree.
author Dave Love <fx@gnu.org>
date Wed, 18 Aug 1999 13:07:21 +0000
parents c79dc141ef5a
children 5c1dc7109bb8
comparison
equal deleted inserted replaced
25320:107c9221181c 25321:2ad9fa0386b6
3841 HOW_MUCH should equal TOTAL, 3841 HOW_MUCH should equal TOTAL,
3842 or should be <= 0 if we couldn't read the file. */ 3842 or should be <= 0 if we couldn't read the file. */
3843 3843
3844 if (how_much < 0) 3844 if (how_much < 0)
3845 { 3845 {
3846 free (conversion_buffer); 3846 xfree (conversion_buffer);
3847 3847
3848 if (how_much == -1) 3848 if (how_much == -1)
3849 error ("IO error reading %s: %s", 3849 error ("IO error reading %s: %s",
3850 XSTRING (orig_filename)->data, strerror (errno)); 3850 XSTRING (orig_filename)->data, strerror (errno));
3851 else if (how_much == -2) 3851 else if (how_much == -2)
3863 /* If the file matches the buffer completely, 3863 /* If the file matches the buffer completely,
3864 there's no need to replace anything. */ 3864 there's no need to replace anything. */
3865 3865
3866 if (bufpos == inserted) 3866 if (bufpos == inserted)
3867 { 3867 {
3868 free (conversion_buffer); 3868 xfree (conversion_buffer);
3869 close (fd); 3869 close (fd);
3870 specpdl_ptr--; 3870 specpdl_ptr--;
3871 /* Truncate the buffer to the size of the file. */ 3871 /* Truncate the buffer to the size of the file. */
3872 del_range_byte (same_at_start, same_at_end, 0); 3872 del_range_byte (same_at_start, same_at_end, 0);
3873 inserted = 0; 3873 inserted = 0;