]> icculus.org git repositories - icculus/xz.git/blob - src/liblzma/common/extra.c
Update the file format specification draft. The new one is
[icculus/xz.git] / src / liblzma / common / extra.c
1 ///////////////////////////////////////////////////////////////////////////////
2 //
3 /// \file       extra.c
4 /// \brief      Handling of Extra in Metadata
5 //
6 //  Copyright (C) 2007 Lasse Collin
7 //
8 //  This library is free software; you can redistribute it and/or
9 //  modify it under the terms of the GNU Lesser General Public
10 //  License as published by the Free Software Foundation; either
11 //  version 2.1 of the License, or (at your option) any later version.
12 //
13 //  This library is distributed in the hope that it will be useful,
14 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
15 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16 //  Lesser General Public License for more details.
17 //
18 ///////////////////////////////////////////////////////////////////////////////
19
20 #include "common.h"
21
22
23 extern LZMA_API void
24 lzma_extra_free(lzma_extra *extra, lzma_allocator *allocator)
25 {
26         while (extra != NULL) {
27                 lzma_extra *tmp = extra->next;
28                 lzma_free(extra->data, allocator);
29                 lzma_free(extra, allocator);
30                 extra = tmp;
31         }
32
33         return;
34 }