]> git.tdb.fi Git - libs/al.git/blobdiff - source/source.cpp
Fix some uninitialized variables and memory leaks
[libs/al.git] / source / source.cpp
index ff04adfba0b51949d64ef369438a4aa63349194a..348b41e37cd6d98d12665a9cc6929b064a9db518 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
 */
 
@@ -122,14 +122,14 @@ void Source::clear_buffers()
 
 unsigned Source::get_buffers_queued() const
 {
-       int n;
+       int n=0;
        get_attribute(AL_BUFFERS_QUEUED, &n);
        return n;
 }
 
 unsigned Source::get_buffers_processed() const
 {
-       int n;
+       int n=0;
        get_attribute(AL_BUFFERS_PROCESSED, &n);
        return n;
 }