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


apps/speed.c:1655:1: start of procedure do_multi()
1653.   
1654.   #ifdef HAVE_FORK
1655. > static int do_multi(int multi)
1656.   	{
1657.   	int n;

apps/speed.c:1660:2: 
1658.   	int fd[2];
1659.   	int *fds;
1660. > 	static char sep[]=":";
1661.   
1662.   	fds=malloc(multi*sizeof *fds);

apps/speed.c:1662:2: 
1660.   	static char sep[]=":";
1661.   
1662. > 	fds=malloc(multi*sizeof *fds);
1663.   	for(n=0 ; n < multi ; ++n)
1664.   		{

apps/speed.c:1663:6: 
1661.   
1662.   	fds=malloc(multi*sizeof *fds);
1663. > 	for(n=0 ; n < multi ; ++n)
1664.   		{
1665.   		pipe(fd);

apps/speed.c:1663:12: Loop condition is false. Leaving loop
1661.   
1662.   	fds=malloc(multi*sizeof *fds);
1663.   	for(n=0 ; n < multi ; ++n)
                   ^
1664.   		{
1665.   		pipe(fd);

apps/speed.c:1685:6: 
1683.   
1684.   	/* for now, assume the pipe is long enough to take all the output */
1685. > 	for(n=0 ; n < multi ; ++n)
1686.   		{
1687.   		FILE *f;

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

apps/speed.c:1691:3: 
1689.   		char *p;
1690.   
1691. > 		f=fdopen(fds[n],"r");
1692.   		while(fgets(buf,sizeof buf,f))
1693.   			{

apps/speed.c:1692:9: 
1690.   
1691.   		f=fdopen(fds[n],"r");
1692. > 		while(fgets(buf,sizeof buf,f))
1693.   			{
1694.   			p=strchr(buf,'\n');
