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:
parent
bf881fa4c2
commit
a97f03b781
@ -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.
|
||||
|
7
count.c
7
count.c
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user