apps/speed.c:2535: error: NULL_DEREFERENCE
  pointer `f` last assigned on line 2534 could be null and is dereferenced by call to `fgets()` at line 2535, column 9.
Showing all 9 steps of the trace


apps/speed.c:2498:1: start of procedure do_multi()
2496.   
2497.   #ifdef HAVE_FORK
2498. > static int do_multi(int multi)
2499.   	{
2500.   	int n;

apps/speed.c:2503:2: 
2501.   	int fd[2];
2502.   	int *fds;
2503. > 	static char sep[]=":";
2504.   
2505.   	fds=malloc(multi*sizeof *fds);

apps/speed.c:2505:2: 
2503.   	static char sep[]=":";
2504.   
2505. > 	fds=malloc(multi*sizeof *fds);
2506.   	for(n=0 ; n < multi ; ++n)
2507.   		{

apps/speed.c:2506:6: 
2504.   
2505.   	fds=malloc(multi*sizeof *fds);
2506. > 	for(n=0 ; n < multi ; ++n)
2507.   		{
2508.   		pipe(fd);

apps/speed.c:2506:12: Loop condition is false. Leaving loop
2504.   
2505.   	fds=malloc(multi*sizeof *fds);
2506.   	for(n=0 ; n < multi ; ++n)
                   ^
2507.   		{
2508.   		pipe(fd);

apps/speed.c:2528:6: 
2526.   
2527.   	/* for now, assume the pipe is long enough to take all the output */
2528. > 	for(n=0 ; n < multi ; ++n)
2529.   		{
2530.   		FILE *f;

apps/speed.c:2528:12: Loop condition is true. Entering loop body
2526.   
2527.   	/* for now, assume the pipe is long enough to take all the output */
2528.   	for(n=0 ; n < multi ; ++n)
                   ^
2529.   		{
2530.   		FILE *f;

apps/speed.c:2534:3: 
2532.   		char *p;
2533.   
2534. > 		f=fdopen(fds[n],"r");
2535.   		while(fgets(buf,sizeof buf,f))
2536.   			{

apps/speed.c:2535:9: 
2533.   
2534.   		f=fdopen(fds[n],"r");
2535. > 		while(fgets(buf,sizeof buf,f))
2536.   			{
2537.   			p=strchr(buf,'\n');
