summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2008-05-27 18:46:34 +0000
committerLennart Poettering <lennart@poettering.net>2008-05-27 18:46:34 +0000
commit7a66b7927d9071502af228c471992821dc53d245 (patch)
treedcaf50200fedaba7435c83f3fdca6b2b3b768965
parent83ad45a0e82d441f4ce616d6b6287da55dd134ff (diff)
fix another memleak and a typo
git-svn-id: file:///home/lennart/svn/public/libcanberra/trunk@25 01b60673-d06a-42c0-afdd-89cb8e0f78ac
-rw-r--r--src/read-sound-file.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/read-sound-file.c b/src/read-sound-file.c
index a0e24fc..e32aecf 100644
--- a/src/read-sound-file.c
+++ b/src/read-sound-file.c
@@ -103,6 +103,8 @@ void ca_sound_file_close(ca_sound_file *f) {
ca_wav_close(f->wav);
if (f->vorbis)
ca_vorbis_close(f->vorbis);
+
+ ca_free(f->filename);
ca_free(f);
}
@@ -113,7 +115,7 @@ unsigned ca_sound_file_get_nchannels(ca_sound_file *f) {
unsigned ca_sound_file_get_rate(ca_sound_file *f) {
ca_assert(f);
- return f->nchannels;
+ return f->rate;
}
ca_sample_type_t ca_sound_file_get_sample_type(ca_sound_file *f) {