[gnome-keyring] [gcr] Fix memory leaks in gcr test code.
- From: Stefan Walter <stefw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-keyring] [gcr] Fix memory leaks in gcr test code.
- Date: Mon, 13 Dec 2010 18:58:55 +0000 (UTC)
commit a47bf28ad2a01ffd3253d8784f0adab46b1732a8
Author: Stef Walter <stefw collabora co uk>
Date: Mon Dec 13 18:58:14 2010 +0000
[gcr] Fix memory leaks in gcr test code.
gcr/tests/unit-test-parser.c | 2 ++
testing/testing.c | 1 +
2 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gcr/tests/unit-test-parser.c b/gcr/tests/unit-test-parser.c
index f62a07b..6d10d2a 100644
--- a/gcr/tests/unit-test-parser.c
+++ b/gcr/tests/unit-test-parser.c
@@ -127,6 +127,8 @@ DEFINE_TEST(parse_all)
contents = testing_data_read (filename, &len);
result = gcr_parser_parse_data (parser, contents, len, &err);
+ g_free (contents);
+
if (!result) {
g_warning ("couldn't parse file data: %s: %s",
filename, egg_error_message (err));
diff --git a/testing/testing.c b/testing/testing.c
index 7dd4116..6d1257f 100644
--- a/testing/testing.c
+++ b/testing/testing.c
@@ -240,6 +240,7 @@ chdir_base_dir (char* argv0)
g_strerror (errno));
}
+ g_free (base);
g_free (dir);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]