[PATCH] trivial patch for stf.c
- From: Art Haas <ahaas neosoft com>
- To: gnumeric-list gnome org
- Subject: [PATCH] trivial patch for stf.c
- Date: Mon, 3 Jun 2002 16:42:04 -0500
Hi.
Here's a patch that will close a file descriptor leak in
an error condition. This patch is based on the code in
the gnome_1_4 tag (gnumeric 1.0.X).
Thanks for all the work on Gnumeric - it's a great spreadsheet.
Index: stf.c
===================================================================
RCS file: /cvs/gnome/gnumeric/src/stf.c,v
retrieving revision 1.37.2.4
diff -u -r1.37.2.4 stf.c
--- stf.c 2 Jun 2002 00:08:32 -0000 1.37.2.4
+++ stf.c 3 Jun 2002 21:37:26 -0000
@@ -90,6 +90,7 @@
*/
data = calloc (1, sbuf.st_size + 1);
if (!data)
+ close (fd);
return NULL;
/*
--
They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety.
-- Benjamin Franklin, Historical Review of Pennsylvania, 1759
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]