X-Git-Url: http://drtracing.org/?a=blobdiff_plain;ds=sidebyside;f=binutils%2Fdlltool.c;h=d22ff54e098a19551ebab7ba8e2a02cf18002c00;hb=0ac553107c601cc9c4c340338e0fc7e0ce8375cc;hp=85304d0c37fcf064ecffe28d451d3ea48e72ce3b;hpb=fd3619828e94a24a92cddec42cbc0ab33352eeb4;p=deliverable%2Fbinutils-gdb.git diff --git a/binutils/dlltool.c b/binutils/dlltool.c index 85304d0c37..d22ff54e09 100644 --- a/binutils/dlltool.c +++ b/binutils/dlltool.c @@ -1,5 +1,5 @@ /* dlltool.c -- tool to generate stuff for PE style DLLs - Copyright (C) 1995-2019 Free Software Foundation, Inc. + Copyright (C) 1995-2020 Free Software Foundation, Inc. This file is part of GNU Binutils. @@ -240,6 +240,7 @@ #include "bucomm.h" #include "dlltool.h" #include "safe-ctype.h" +#include "coff-bfd.h" #include #include @@ -1252,8 +1253,7 @@ def_import (const char *app_name, const char *module, const char *dllext, append_import (application_name, module, ord_val, its_name); - if (buf) - free (buf); + free (buf); } void @@ -1334,7 +1334,7 @@ run (const char *what, char *args) pid = pexecute (argv[0], (char * const *) argv, program_name, temp_base, &errmsg_fmt, &errmsg_arg, PEXECUTE_ONE | PEXECUTE_SEARCH); - free(argv); + free (argv); if (pid == -1) { @@ -3387,15 +3387,8 @@ dll_name_list_free_contents (dll_name_list_node_type * entry) if (entry) { if (entry->next) - { - dll_name_list_free_contents (entry->next); - entry->next = NULL; - } - if (entry->dllname) - { - free (entry->dllname); - entry->dllname = NULL; - } + dll_name_list_free_contents (entry->next); + free (entry->dllname); free (entry); } }