Thu, 20 Mar 2003 07:02:28 +0000
fix multiple close of input file.
tumble_input.c | file | annotate | diff | revisions | |
tumble_tiff.c | file | annotate | diff | revisions |
1.1 diff -r 752599b50ff3 -r cfa664f3129c tumble_input.c 1.2 --- a/tumble_input.c Thu Mar 20 06:54:08 2003 +0000 1.3 +++ b/tumble_input.c Thu Mar 20 07:02:28 2003 +0000 1.4 @@ -2,7 +2,7 @@ 1.5 * tumble: build a PDF file from image files 1.6 * 1.7 * Input handler dispatch 1.8 - * $Id: tumble_input.c,v 1.1 2003/03/19 22:54:08 eric Exp $ 1.9 + * $Id: tumble_input.c,v 1.2 2003/03/19 23:02:28 eric Exp $ 1.10 * Copyright 2001, 2002, 2003 Eric Smith <eric@brouhaha.com> 1.11 * 1.12 * This program is free software; you can redistribute it and/or modify 1.13 @@ -106,8 +106,11 @@ 1.14 result = current_input_handler->close_input_file (); 1.15 if (in_filename) 1.16 free (in_filename); 1.17 - fclose (in); 1.18 - in = NULL; 1.19 + if (in) 1.20 + { 1.21 + fclose (in); 1.22 + in = NULL; 1.23 + } 1.24 1.25 return (result); 1.26 }
2.1 diff -r 752599b50ff3 -r cfa664f3129c tumble_tiff.c 2.2 --- a/tumble_tiff.c Thu Mar 20 06:54:08 2003 +0000 2.3 +++ b/tumble_tiff.c Thu Mar 20 07:02:28 2003 +0000 2.4 @@ -1,7 +1,7 @@ 2.5 /* 2.6 * tumble: build a PDF file from image files 2.7 * 2.8 - * $Id: tumble_tiff.c,v 1.1 2003/03/19 22:54:08 eric Exp $ 2.9 + * $Id: tumble_tiff.c,v 1.2 2003/03/19 23:02:28 eric Exp $ 2.10 * Copyright 2001, 2002, 2003 Eric Smith <eric@brouhaha.com> 2.11 * 2.12 * This program is free software; you can redistribute it and/or modify 2.13 @@ -65,8 +65,6 @@ 2.14 if ((buf [0] != 0x49) || (buf [1] != 0x49)) 2.15 return (0); 2.16 2.17 - /* $$$ should we dup the file descriptor here, so that later closing f 2.18 - won't cause problems? */ 2.19 tiff_in = TIFFFdOpen (fileno (f), name, "r"); 2.20 if (! tiff_in) 2.21 {