Imported Upstream version 0.165
[platform/upstream/elfutils.git] / tests / allregs.c
index b103ce1..286f7e3 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005, 2006 Red Hat, Inc.
+/* Copyright (C) 2005, 2006, 2015 Red Hat, Inc.
    This file is part of elfutils.
 
    This file is free software; you can redistribute it and/or modify
@@ -35,9 +35,9 @@ dwarf_encoding_string (unsigned int code)
 {
   static const char *const known[] =
     {
-#define ONE_KNOWN_DW_ATE(NAME, CODE) [CODE] = #NAME,
-      ALL_KNOWN_DW_ATE
-#undef ONE_KNOWN_DW_ATE
+#define DWARF_ONE_KNOWN_DW_ATE(NAME, CODE) [CODE] = #NAME,
+      DWARF_ALL_KNOWN_DW_ATE
+#undef DWARF_ONE_KNOWN_DW_ATE
     };
 
   if (likely (code < sizeof (known) / sizeof (known[0])))
@@ -184,6 +184,7 @@ main (int argc, char **argv)
                    dwarf_encoding_string (state.info[i].type),
                    state.info[i].bits);
          }
+      free (state.info);
     }
   else
     do