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


apps/speed.c:2457:1: start of procedure do_multi()
2455.       }
2456.   
2457. > static int do_multi(int multi)
2458.   	{
2459.   	int n;

apps/speed.c:2462:2: 
2460.   	int fd[2];
2461.   	int *fds;
2462. > 	static char sep[]=":";
2463.   
2464.   	fds=malloc(multi*sizeof *fds);

apps/speed.c:2464:2: 
2462.   	static char sep[]=":";
2463.   
2464. > 	fds=malloc(multi*sizeof *fds);
2465.   	for(n=0 ; n < multi ; ++n)
2466.   		{

apps/speed.c:2465:6: 
2463.   
2464.   	fds=malloc(multi*sizeof *fds);
2465. > 	for(n=0 ; n < multi ; ++n)
2466.   		{
2467.   		pipe(fd);

apps/speed.c:2465:12: Loop condition is false. Leaving loop
2463.   
2464.   	fds=malloc(multi*sizeof *fds);
2465.   	for(n=0 ; n < multi ; ++n)
                   ^
2466.   		{
2467.   		pipe(fd);

apps/speed.c:2487:6: 
2485.   
2486.   	/* for now, assume the pipe is long enough to take all the output */
2487. > 	for(n=0 ; n < multi ; ++n)
2488.   		{
2489.   		FILE *f;

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

apps/speed.c:2493:3: 
2491.   		char *p;
2492.   
2493. > 		f=fdopen(fds[n],"r");
2494.   		while(fgets(buf,sizeof buf,f))
2495.   			{

apps/speed.c:2494:9: 
2492.   
2493.   		f=fdopen(fds[n],"r");
2494. > 		while(fgets(buf,sizeof buf,f))
2495.   			{
2496.   			p=strchr(buf,'\n');
