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


apps/speed.c:2489:1: start of procedure do_multi()
2487.       }
2488.   
2489. > static int do_multi(int multi)
2490.   	{
2491.   	int n;

apps/speed.c:2494:2: 
2492.   	int fd[2];
2493.   	int *fds;
2494. > 	static char sep[]=":";
2495.   
2496.   	fds=malloc(multi*sizeof *fds);

apps/speed.c:2496:2: 
2494.   	static char sep[]=":";
2495.   
2496. > 	fds=malloc(multi*sizeof *fds);
2497.   	for(n=0 ; n < multi ; ++n)
2498.   		{

apps/speed.c:2497:6: 
2495.   
2496.   	fds=malloc(multi*sizeof *fds);
2497. > 	for(n=0 ; n < multi ; ++n)
2498.   		{
2499.   		pipe(fd);

apps/speed.c:2497:12: Loop condition is false. Leaving loop
2495.   
2496.   	fds=malloc(multi*sizeof *fds);
2497.   	for(n=0 ; n < multi ; ++n)
                   ^
2498.   		{
2499.   		pipe(fd);

apps/speed.c:2519:6: 
2517.   
2518.   	/* for now, assume the pipe is long enough to take all the output */
2519. > 	for(n=0 ; n < multi ; ++n)
2520.   		{
2521.   		FILE *f;

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

apps/speed.c:2525:3: 
2523.   		char *p;
2524.   
2525. > 		f=fdopen(fds[n],"r");
2526.   		while(fgets(buf,sizeof buf,f))
2527.   			{

apps/speed.c:2526:9: 
2524.   
2525.   		f=fdopen(fds[n],"r");
2526. > 		while(fgets(buf,sizeof buf,f))
2527.   			{
2528.   			p=strchr(buf,'\n');
