Fix a memory leak in the ALAC decoder.
[deb_shairplay.git] / src / lib / raop_buffer.c
index 45a1aeb587b4a3aba99a98cf16459034224510ad..7869d1d53c5d59fd597b7b1159acb50573a0c206 100644 (file)
@@ -1,3 +1,17 @@
+/**
+ *  Copyright (C) 2011-2012  Juho Vähä-Herttua
+ *
+ *  This library is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public
+ *  License as published by the Free Software Foundation; either
+ *  version 2.1 of the License, or (at your option) any later version.
+ *
+ *  This library is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ */
+
 #include <stdlib.h>
 #include <string.h>
 #include <assert.h>
@@ -197,8 +211,8 @@ void
 raop_buffer_destroy(raop_buffer_t *raop_buffer)
 {
        if (raop_buffer) {
+               destroy_alac(raop_buffer->alac);
                free(raop_buffer->buffer);
-               free(raop_buffer->alac);
                free(raop_buffer);
        }
 }