[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Wesnoth-cvs-commits] wesnoth/src filesystem.cpp
From: |
Yann Dirson |
Subject: |
[Wesnoth-cvs-commits] wesnoth/src filesystem.cpp |
Date: |
Sat, 08 Jan 2005 06:52:24 -0500 |
CVSROOT: /cvsroot/wesnoth
Module name: wesnoth
Branch:
Changes by: Yann Dirson <address@hidden> 05/01/08 11:25:41
Modified files:
src : filesystem.cpp
Log message:
fixed FD/memory leak when reading file contents from zipios (thanks
silene)
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/filesystem.cpp.diff?tr1=1.53&tr2=1.54&r1=text&r2=text
Patches:
Index: wesnoth/src/filesystem.cpp
diff -u wesnoth/src/filesystem.cpp:1.53 wesnoth/src/filesystem.cpp:1.54
--- wesnoth/src/filesystem.cpp:1.53 Sat Jan 8 00:13:30 2005
+++ wesnoth/src/filesystem.cpp Sat Jan 8 11:25:41 2005
@@ -1,4 +1,4 @@
-/* $Id: filesystem.cpp,v 1.53 2005/01/08 00:13:30 ydirson Exp $ */
+/* $Id: filesystem.cpp,v 1.54 2005/01/08 11:25:41 ydirson Exp $ */
/*
Copyright (C) 2003 by David White <address@hidden>
Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -468,7 +468,9 @@
if (p != 0) {
std::istream* s = the_collection.getInputStream(p);
if (s != NULL) {
- return read_stream(*s);
+ std::string contents = read_stream(*s);
+ delete s;
+ return contents;
}
}
}
- [Wesnoth-cvs-commits] wesnoth/src filesystem.cpp,
Yann Dirson <=