13c84db3b4b610bf636c4363abb6d3dac5ae020f9Roland McGrath/* Clean up Dwarf_CFI structure.
23c84db3b4b610bf636c4363abb6d3dac5ae020f9Roland McGrath   Copyright (C) 2009 Red Hat, Inc.
3de2ed97f33139af5c7a0811e4ec66fc896a13cf2Mark Wielaard   This file is part of elfutils.
43c84db3b4b610bf636c4363abb6d3dac5ae020f9Roland McGrath
5de2ed97f33139af5c7a0811e4ec66fc896a13cf2Mark Wielaard   This file is free software; you can redistribute it and/or modify
6de2ed97f33139af5c7a0811e4ec66fc896a13cf2Mark Wielaard   it under the terms of either
73c84db3b4b610bf636c4363abb6d3dac5ae020f9Roland McGrath
8de2ed97f33139af5c7a0811e4ec66fc896a13cf2Mark Wielaard     * the GNU Lesser General Public License as published by the Free
9de2ed97f33139af5c7a0811e4ec66fc896a13cf2Mark Wielaard       Software Foundation; either version 3 of the License, or (at
10de2ed97f33139af5c7a0811e4ec66fc896a13cf2Mark Wielaard       your option) any later version
11de2ed97f33139af5c7a0811e4ec66fc896a13cf2Mark Wielaard
12de2ed97f33139af5c7a0811e4ec66fc896a13cf2Mark Wielaard   or
13de2ed97f33139af5c7a0811e4ec66fc896a13cf2Mark Wielaard
14de2ed97f33139af5c7a0811e4ec66fc896a13cf2Mark Wielaard     * the GNU General Public License as published by the Free
15de2ed97f33139af5c7a0811e4ec66fc896a13cf2Mark Wielaard       Software Foundation; either version 2 of the License, or (at
16de2ed97f33139af5c7a0811e4ec66fc896a13cf2Mark Wielaard       your option) any later version
17de2ed97f33139af5c7a0811e4ec66fc896a13cf2Mark Wielaard
18de2ed97f33139af5c7a0811e4ec66fc896a13cf2Mark Wielaard   or both in parallel, as here.
19de2ed97f33139af5c7a0811e4ec66fc896a13cf2Mark Wielaard
20de2ed97f33139af5c7a0811e4ec66fc896a13cf2Mark Wielaard   elfutils is distributed in the hope that it will be useful, but
213c84db3b4b610bf636c4363abb6d3dac5ae020f9Roland McGrath   WITHOUT ANY WARRANTY; without even the implied warranty of
223c84db3b4b610bf636c4363abb6d3dac5ae020f9Roland McGrath   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
233c84db3b4b610bf636c4363abb6d3dac5ae020f9Roland McGrath   General Public License for more details.
243c84db3b4b610bf636c4363abb6d3dac5ae020f9Roland McGrath
25de2ed97f33139af5c7a0811e4ec66fc896a13cf2Mark Wielaard   You should have received copies of the GNU General Public License and
26de2ed97f33139af5c7a0811e4ec66fc896a13cf2Mark Wielaard   the GNU Lesser General Public License along with this program.  If
27de2ed97f33139af5c7a0811e4ec66fc896a13cf2Mark Wielaard   not, see <http://www.gnu.org/licenses/>.  */
283c84db3b4b610bf636c4363abb6d3dac5ae020f9Roland McGrath
293c84db3b4b610bf636c4363abb6d3dac5ae020f9Roland McGrath#ifdef HAVE_CONFIG_H
303c84db3b4b610bf636c4363abb6d3dac5ae020f9Roland McGrath# include <config.h>
313c84db3b4b610bf636c4363abb6d3dac5ae020f9Roland McGrath#endif
323c84db3b4b610bf636c4363abb6d3dac5ae020f9Roland McGrath
333c84db3b4b610bf636c4363abb6d3dac5ae020f9Roland McGrath#include "libdwP.h"
343c84db3b4b610bf636c4363abb6d3dac5ae020f9Roland McGrath#include "cfi.h"
353c84db3b4b610bf636c4363abb6d3dac5ae020f9Roland McGrath#include <stdlib.h>
363c84db3b4b610bf636c4363abb6d3dac5ae020f9Roland McGrath
373c84db3b4b610bf636c4363abb6d3dac5ae020f9Roland McGrathint
381ccdfb683ad6c7e59793136c3a657ddf131cafd1Mark Wielaarddwarf_cfi_end (Dwarf_CFI *cache)
393c84db3b4b610bf636c4363abb6d3dac5ae020f9Roland McGrath{
403c84db3b4b610bf636c4363abb6d3dac5ae020f9Roland McGrath  if (cache != NULL)
413c84db3b4b610bf636c4363abb6d3dac5ae020f9Roland McGrath    {
423c84db3b4b610bf636c4363abb6d3dac5ae020f9Roland McGrath      __libdw_destroy_frame_cache (cache);
433c84db3b4b610bf636c4363abb6d3dac5ae020f9Roland McGrath      free (cache);
443c84db3b4b610bf636c4363abb6d3dac5ae020f9Roland McGrath    }
453c84db3b4b610bf636c4363abb6d3dac5ae020f9Roland McGrath
463c84db3b4b610bf636c4363abb6d3dac5ae020f9Roland McGrath  return 0;
473c84db3b4b610bf636c4363abb6d3dac5ae020f9Roland McGrath}
483c84db3b4b610bf636c4363abb6d3dac5ae020f9Roland McGrathINTDEF (dwarf_cfi_end)
49