]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
Fix free of literal string
authorPetr Machata <pmachata@redhat.com>
Mon, 16 Feb 2009 16:45:40 +0000 (17:45 +0100)
committerPetr Machata <pmachata@redhat.com>
Mon, 16 Feb 2009 16:45:40 +0000 (17:45 +0100)
src/dwarflint.c

index 38cb117e37ab5879790ff3dfbd5dba93758cc508..09da37fd761d16de74cfbee4e66b324519bf318b 100644 (file)
@@ -2488,7 +2488,8 @@ relocate_one (struct relocation_data *reloc, GElf_Rela *rela,
                        ": relocation references section %s, but %s was expected.\n",
                        wh1, wh2);
              free (wh2);
-             free (wh1);
+             if (id != sec_invalid)
+               free (wh1);
            }
        }
     }