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


apps/speed.c:2527:1: start of procedure do_multi()
2525.       }
2526.   
2527. > static int do_multi(int multi)
2528.   	{
2529.   	int n;

apps/speed.c:2532:2: 
2530.   	int fd[2];
2531.   	int *fds;
2532. > 	static char sep[]=":";
2533.   
2534.   	fds=malloc(multi*sizeof *fds);

apps/speed.c:2534:2: 
2532.   	static char sep[]=":";
2533.   
2534. > 	fds=malloc(multi*sizeof *fds);
2535.   	for(n=0 ; n < multi ; ++n)
2536.   		{

apps/speed.c:2535:6: 
2533.   
2534.   	fds=malloc(multi*sizeof *fds);
2535. > 	for(n=0 ; n < multi ; ++n)
2536.   		{
2537.   		pipe(fd);

apps/speed.c:2535:12: Loop condition is false. Leaving loop
2533.   
2534.   	fds=malloc(multi*sizeof *fds);
2535.   	for(n=0 ; n < multi ; ++n)
                   ^
2536.   		{
2537.   		pipe(fd);

apps/speed.c:2558:6: 
2556.   
2557.   	/* for now, assume the pipe is long enough to take all the output */
2558. > 	for(n=0 ; n < multi ; ++n)
2559.   		{
2560.   		FILE *f;

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

apps/speed.c:2564:3: 
2562.   		char *p;
2563.   
2564. > 		f=fdopen(fds[n],"r");
2565.   		while(fgets(buf,sizeof buf,f))
2566.   			{

apps/speed.c:2565:9: 
2563.   
2564.   		f=fdopen(fds[n],"r");
2565. > 		while(fgets(buf,sizeof buf,f))
2566.   			{
2567.   			p=strchr(buf,'\n');
