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


apps/speed.c:1682:1: start of procedure do_multi()
1680.   
1681.   #ifdef HAVE_FORK
1682. > static int do_multi(int multi)
1683.   	{
1684.   	int n;

apps/speed.c:1687:2: 
1685.   	int fd[2];
1686.   	int *fds;
1687. > 	static char sep[]=":";
1688.   
1689.   	fds=malloc(multi*sizeof *fds);

apps/speed.c:1689:2: 
1687.   	static char sep[]=":";
1688.   
1689. > 	fds=malloc(multi*sizeof *fds);
1690.   	for(n=0 ; n < multi ; ++n)
1691.   		{

apps/speed.c:1690:6: 
1688.   
1689.   	fds=malloc(multi*sizeof *fds);
1690. > 	for(n=0 ; n < multi ; ++n)
1691.   		{
1692.   		pipe(fd);

apps/speed.c:1690:12: Loop condition is false. Leaving loop
1688.   
1689.   	fds=malloc(multi*sizeof *fds);
1690.   	for(n=0 ; n < multi ; ++n)
                   ^
1691.   		{
1692.   		pipe(fd);

apps/speed.c:1712:6: 
1710.   
1711.   	/* for now, assume the pipe is long enough to take all the output */
1712. > 	for(n=0 ; n < multi ; ++n)
1713.   		{
1714.   		FILE *f;

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

apps/speed.c:1718:3: 
1716.   		char *p;
1717.   
1718. > 		f=fdopen(fds[n],"r");
1719.   		while(fgets(buf,sizeof buf,f))
1720.   			{

apps/speed.c:1719:9: 
1717.   
1718.   		f=fdopen(fds[n],"r");
1719. > 		while(fgets(buf,sizeof buf,f))
1720.   			{
1721.   			p=strchr(buf,'\n');
