[PATCH] nntp method leak fixes
- From: Thomas Cataldo <thomas cataldo aliacom fr>
- To: gnome-vfs-list gnome org
- Subject: [PATCH] nntp method leak fixes
- Date: Sun, 25 Jan 2004 15:09:12 +0100
Hi,
Here is a patch to fix a few leaks in the nntp method. I tested it using
gnomevfs-ls nntp://<my-isp-server>/alt.binaries.anime
regards,
Thomas.
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gnome-vfs/ChangeLog,v
retrieving revision 1.1715
diff -u -r1.1715 ChangeLog
--- ChangeLog 23 Jan 2004 09:59:44 -0000 1.1715
+++ ChangeLog 25 Jan 2004 13:58:56 -0000
@@ -1,3 +1,8 @@
+2004-01-25 Thomas Cataldo <thomas cataldo aliacom fr>
+
+ * modules/nntp-method.c: (parse_date_string), (parse_header): some
+ memory leak fixes.
+
2004-01-23 Alexander Larsson <alexl redhat com>
* schemas/Makefile.am:
Index: modules/nntp-method.c
===================================================================
RCS file: /cvs/gnome/gnome-vfs/modules/nntp-method.c,v
retrieving revision 1.5
diff -u -r1.5 nntp-method.c
--- modules/nntp-method.c 16 Jun 2002 23:43:35 -0000 1.5
+++ modules/nntp-method.c 25 Jan 2004 13:58:57 -0000
@@ -814,6 +814,12 @@
g_message("error parsing %s, %s", date_string, temp_str);
}
+ if (filename != NULL) {
+ g_free (filename);
+ }
+ if (linkname != NULL) {
+ g_free (linkname);
+ }
g_free(temp_str);
*t = s.st_mtime;
@@ -904,6 +910,8 @@
file_start = strrchr (temp_str, '-');
if (file_start == NULL) {
+ g_free (*message_id);
+ g_free (temp_str);
return FALSE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]