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


apps/speed.c:1660:1: start of procedure do_multi()
1658.   
1659.   #ifdef HAVE_FORK
1660. > static int do_multi(int multi)
1661.   	{
1662.   	int n;

apps/speed.c:1665:2: 
1663.   	int fd[2];
1664.   	int *fds;
1665. > 	static char sep[]=":";
1666.   
1667.   	fds=malloc(multi*sizeof *fds);

apps/speed.c:1667:2: 
1665.   	static char sep[]=":";
1666.   
1667. > 	fds=malloc(multi*sizeof *fds);
1668.   	for(n=0 ; n < multi ; ++n)
1669.   		{

apps/speed.c:1668:6: 
1666.   
1667.   	fds=malloc(multi*sizeof *fds);
1668. > 	for(n=0 ; n < multi ; ++n)
1669.   		{
1670.   		pipe(fd);

apps/speed.c:1668:12: Loop condition is false. Leaving loop
1666.   
1667.   	fds=malloc(multi*sizeof *fds);
1668.   	for(n=0 ; n < multi ; ++n)
                   ^
1669.   		{
1670.   		pipe(fd);

apps/speed.c:1690:6: 
1688.   
1689.   	/* for now, assume the pipe is long enough to take all the output */
1690. > 	for(n=0 ; n < multi ; ++n)
1691.   		{
1692.   		FILE *f;

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

apps/speed.c:1696:3: 
1694.   		char *p;
1695.   
1696. > 		f=fdopen(fds[n],"r");
1697.   		while(fgets(buf,sizeof buf,f))
1698.   			{

apps/speed.c:1697:9: 
1695.   
1696.   		f=fdopen(fds[n],"r");
1697. > 		while(fgets(buf,sizeof buf,f))
1698.   			{
1699.   			p=strchr(buf,'\n');
