]> git.tdb.fi Git - libs/al.git/blobdiff - source/sound.cpp
Fix some uninitialized variables and memory leaks
[libs/al.git] / source / sound.cpp
index 8b6af20fcde8fe2c0ea22951a8d138c3dece0289..15596053309f2ba436da99e3bd6bba69b4f892b4 100644 (file)
@@ -1,7 +1,7 @@
 /* $Id$
 
 This file is part of libmspal
-Copyright © 2008 Mikko Rasa, Mikkosoft Productions
+Copyright © 2008-2009  Mikko Rasa, Mikkosoft Productions
 Distributed under the LGPL
 */
 
@@ -46,9 +46,10 @@ int memory_seek(void *src, ogg_int64_t offset, int whence)
        return memsrc.pos;
 }
 
-void memory_close(void *src)
+int memory_close(void *src)
 {
        delete reinterpret_cast<MemorySource *>(src);
+       return 0;
 }
 
 long memory_tell(void *src)
@@ -61,7 +62,7 @@ ov_callbacks memory_callbacks=
 {
        &memory_read,
        &memory_seek,
-       0,
+       &memory_close,
        &memory_tell
 };