apps/speed.c:1822: error: NULL_DEREFERENCE
  pointer `fds` last assigned on line 1815 could be null and is dereferenced at line 1822, column 4.
Showing all 9 steps of the trace


apps/speed.c:1808:1: start of procedure do_multi()
1806.   
1807.   #ifdef HAVE_FORK
1808. > static int do_multi(int multi)
1809.   	{
1810.   	int n;

apps/speed.c:1813:2: 
1811.   	int fd[2];
1812.   	int *fds;
1813. > 	static char sep[]=":";
1814.   
1815.   	fds=malloc(multi*sizeof *fds);

apps/speed.c:1815:2: 
1813.   	static char sep[]=":";
1814.   
1815. > 	fds=malloc(multi*sizeof *fds);
1816.   	for(n=0 ; n < multi ; ++n)
1817.   		{

apps/speed.c:1816:6: 
1814.   
1815.   	fds=malloc(multi*sizeof *fds);
1816. > 	for(n=0 ; n < multi ; ++n)
1817.   		{
1818.   		pipe(fd);

apps/speed.c:1816:12: Loop condition is true. Entering loop body
1814.   
1815.   	fds=malloc(multi*sizeof *fds);
1816.   	for(n=0 ; n < multi ; ++n)
                   ^
1817.   		{
1818.   		pipe(fd);

apps/speed.c:1818:3: 
1816.   	for(n=0 ; n < multi ; ++n)
1817.   		{
1818. > 		pipe(fd);
1819.   		if(fork())
1820.   			{

apps/speed.c:1819:6: Taking true branch
1817.   		{
1818.   		pipe(fd);
1819.   		if(fork())
             ^
1820.   			{
1821.   			close(fd[1]);

apps/speed.c:1821:4: 
1819.   		if(fork())
1820.   			{
1821. > 			close(fd[1]);
1822.   			fds[n]=fd[0];
1823.   			}

apps/speed.c:1822:4: 
1820.   			{
1821.   			close(fd[1]);
1822. > 			fds[n]=fd[0];
1823.   			}
1824.   		else
