summaryrefslogtreecommitdiff
path: root/libs/ardour/audio_library.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2014-03-23 00:46:12 +0100
committerRobin Gareus <robin@gareus.org>2014-03-23 00:46:12 +0100
commit89e63b4bce0fbbbdfe5c2685e929c0f46bbbf7ca (patch)
treee1be268c907d7855b107f9fb15f816a8651aad9e /libs/ardour/audio_library.cc
parent167991ecebe30847f76c028bd501f49968271069 (diff)
fix some memory leaks
Diffstat (limited to 'libs/ardour/audio_library.cc')
-rw-r--r--libs/ardour/audio_library.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/libs/ardour/audio_library.cc b/libs/ardour/audio_library.cc
index 4a6089dac3..35c0972847 100644
--- a/libs/ardour/audio_library.cc
+++ b/libs/ardour/audio_library.cc
@@ -105,15 +105,15 @@ AudioLibrary::get_tags (string member)
{
vector<string> tags;
#ifdef HAVE_LRDF
+ char * uri = strdup(Glib::filename_to_uri(member).c_str());
lrdf_statement pattern;
- pattern.subject = strdup(Glib::filename_to_uri(member).c_str());
+ pattern.subject = uri;
pattern.predicate = const_cast<char*>(TAG);
pattern.object = 0;
pattern.object_type = lrdf_literal;
lrdf_statement* matches = lrdf_matches (&pattern);
- free (pattern.subject);
lrdf_statement* current = matches;
while (current != 0) {
@@ -125,6 +125,7 @@ AudioLibrary::get_tags (string member)
lrdf_free_statements (matches);
sort (tags.begin(), tags.end());
+ free (uri);
#endif
return tags;
}