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: <87d31ayhpy.fsf@sejong.aot.lge.com>
Date:	Tue, 25 Sep 2012 11:11:21 +0900
From:	Namhyung Kim <namhyung@...nel.org>
To:	Feng Tang <feng.tang@...el.com>
Cc:	acme@...hat.com, mingo@...e.hu, a.p.zijlstra@...llo.nl,
	andi@...stfloor.org, dsahern@...il.com,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 8/9] perf hists browser: Add option for runtime switching perf data file

On Mon, 24 Sep 2012 23:24:10 +0800, Feng Tang wrote:
[snip]
> +		if (!check_perf_magic(magic)) {
> +			options[nr_options] = strdup(name);
> +			abs_path[nr_options++] = strdup(path);

Need to check return values.


> +		}
> +		fclose(file);
> +	}
> +	closedir(pwd_dir);
> +
> +	if (nr_options) {
> +		choice = ui__popup_menu(nr_options, options);
> +		if (choice < nr_options && choice >= 0) {
> +			input_name = strdup(abs_path[choice]);

Ditto.  Plus it might leak previous input_name.

Thanks,
Namhyung


> +			ret = 0;
> +		}
> +	}
> +
> +	free_popup_options(options, nr_options);
> +	free_popup_options(abs_path, nr_options);
> +	return ret;
> +}
> +
> +
--
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