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


apps/speed.c:2585:1: start of procedure do_multi()
2583.       }
2584.   
2585. > static int do_multi(int multi)
2586.   	{
2587.   	int n;

apps/speed.c:2590:2: 
2588.   	int fd[2];
2589.   	int *fds;
2590. > 	static char sep[]=":";
2591.   
2592.   	fds=malloc(multi*sizeof *fds);

apps/speed.c:2592:2: 
2590.   	static char sep[]=":";
2591.   
2592. > 	fds=malloc(multi*sizeof *fds);
2593.   	for(n=0 ; n < multi ; ++n)
2594.   		{

apps/speed.c:2593:6: 
2591.   
2592.   	fds=malloc(multi*sizeof *fds);
2593. > 	for(n=0 ; n < multi ; ++n)
2594.   		{
2595.   		pipe(fd);

apps/speed.c:2593:12: Loop condition is false. Leaving loop
2591.   
2592.   	fds=malloc(multi*sizeof *fds);
2593.   	for(n=0 ; n < multi ; ++n)
                   ^
2594.   		{
2595.   		pipe(fd);

apps/speed.c:2616:6: 
2614.   
2615.   	/* for now, assume the pipe is long enough to take all the output */
2616. > 	for(n=0 ; n < multi ; ++n)
2617.   		{
2618.   		FILE *f;

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

apps/speed.c:2622:3: 
2620.   		char *p;
2621.   
2622. > 		f=fdopen(fds[n],"r");
2623.   		while(fgets(buf,sizeof buf,f))
2624.   			{

apps/speed.c:2623:9: 
2621.   
2622.   		f=fdopen(fds[n],"r");
2623. > 		while(fgets(buf,sizeof buf,f))
2624.   			{
2625.   			p=strchr(buf,'\n');
