From b77d0934b3fa9df0a5b3046f7fd187687bdb712f Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 2 Feb 2005 04:42:25 +0000 Subject: [PATCH] 2004-12-20 Dmitry V. Levin * syscall.c (call_summary): Fix potential NULL dereference. Fixes RH#143369. --- syscall.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/syscall.c b/syscall.c index a02b03cf..a9f17263 100644 --- a/syscall.c +++ b/syscall.c @@ -2658,7 +2658,7 @@ FILE *outf; error_cum += counts[i].errors; tv_add(&tv_cum, &tv_cum, &counts[i].time); } - if (sortfun) + if (counts && sortfun) qsort((void *) sorted_count, nsyscalls, sizeof(int), sortfun); fprintf(outf, "%6.6s %11.11s %11.11s %9.9s %9.9s %s\n", "% time", "seconds", "usecs/call",