lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHdPZaPBd8evQsHbtNaToGnqSmUyuE_ZNNnPDLGCYD4i8p+sUA@mail.gmail.com>
Date:	Mon, 14 Jan 2013 12:38:13 -0500
From:	"devendra.aaru" <devendra.aaru@...il.com>
To:	David Ahern <dsahern@...il.com>
Cc:	acme@...stprotocols.net, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] perf: dso_load - move name malloc to when needed

On Mon, Jan 14, 2013 at 11:50 AM, David Ahern <dsahern@...il.com> wrote:
> memory is currently leaked on some paths.

you are missing a signoff.

> ---
>  tools/perf/util/symbol.c |    8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
> index 61edfd0..e9c0c3a 100644
> --- a/tools/perf/util/symbol.c
> +++ b/tools/perf/util/symbol.c
> @@ -775,10 +775,6 @@ int dso__load(struct dso *dso, struct map *map, symbol_filter_t filter)
>         else
>                 machine = NULL;
>
> -       name = malloc(PATH_MAX);
> -       if (!name)
> -               return -1;
> -
>         dso->adjust_symbols = 0;
>
>         if (strncmp(dso->name, "/tmp/perf-", 10) == 0) {
> @@ -802,6 +798,10 @@ int dso__load(struct dso *dso, struct map *map, symbol_filter_t filter)
>         if (machine)
>                 root_dir = machine->root_dir;
>
> +       name = malloc(PATH_MAX);
> +       if (!name)
> +               return -1;
> +
>         /* Iterate over candidate debug images.
>          * Keep track of "interesting" ones (those which have a symtab, dynsym,
>          * and/or opd section) for processing.
> --
> 1.7.10.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ