2008-04-19 Dmitry V. Levin <ldv@altlinux.org>

* count.c (call_summary_pers): Check calloc() return value.
	Signed-off-by: "Yang Zhiguo" <yzgcsu@cn.fujitsu.com>
This commit is contained in:
Дмитрий Левин 2008-04-19 14:12:49 +00:00
parent bf881fa4c2
commit a97f03b781
2 changed files with 11 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2008-04-19 Dmitry V. Levin <ldv@altlinux.org>
* count.c (call_summary_pers): Check calloc() return value.
Signed-off-by: "Yang Zhiguo" <yzgcsu@cn.fujitsu.com>
2008-03-26 Roland McGrath <roland@redhat.com>
* strace.spec (strace64_arches): Add sparc64.

View File

@ -164,9 +164,14 @@ call_summary_pers(FILE *outf)
double percent;
char *dashes = "-------------------------";
char error_str[16];
int *sorted_count = calloc(sizeof(int), nsyscalls);
if (!sorted_count)
{
fprintf(stderr, "strace: out of memory for call summary\n");
return;
}
call_cum = error_cum = tv_cum.tv_sec = tv_cum.tv_usec = 0;
if (overhead.tv_sec == -1)
{