[rhythmbox] rhythmdb: fix leaks in ext-db matching function
- From: Jonathan Matthew <jmatthew src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rhythmbox] rhythmdb: fix leaks in ext-db matching function
- Date: Thu, 21 Jun 2012 08:25:15 +0000 (UTC)
commit 3dec1ff5f0b9675e70cab1503dd06ac7ef3cf4ec
Author: Jonathan Matthew <jonathan d14n org>
Date: Wed Jun 20 22:37:49 2012 +1000
rhythmdb: fix leaks in ext-db matching function
rhythmdb/rhythmdb.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/rhythmdb/rhythmdb.c b/rhythmdb/rhythmdb.c
index dfa9d96..99253cb 100644
--- a/rhythmdb/rhythmdb.c
+++ b/rhythmdb/rhythmdb.c
@@ -5448,9 +5448,10 @@ rhythmdb_entry_matches_ext_db_key (RhythmDB *db, RhythmDBEntry *entry, RBExtDBKe
prop = rhythmdb_propid_from_nice_elt_name (db, (const xmlChar *)fields[i]);
if (prop == -1) {
- if (rb_ext_db_key_field_matches (key, fields[i], NULL) == FALSE)
+ if (rb_ext_db_key_field_matches (key, fields[i], NULL) == FALSE) {
+ g_strfreev (fields);
return FALSE;
-
+ }
continue;
}
@@ -5471,9 +5472,12 @@ rhythmdb_entry_matches_ext_db_key (RhythmDB *db, RhythmDBEntry *entry, RBExtDBKe
}
v = rhythmdb_entry_get_string (entry, prop);
- if (rb_ext_db_key_field_matches (key, fields[i], v) == FALSE)
+ if (rb_ext_db_key_field_matches (key, fields[i], v) == FALSE) {
+ g_strfreev (fields);
return FALSE;
+ }
}
+ g_strfreev (fields);
return TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]