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


apps/speed.c:2496:1: start of procedure do_multi()
2494.   
2495.   #ifdef HAVE_FORK
2496. > static int do_multi(int multi)
2497.   	{
2498.   	int n;

apps/speed.c:2501:2: 
2499.   	int fd[2];
2500.   	int *fds;
2501. > 	static char sep[]=":";
2502.   
2503.   	fds=malloc(multi*sizeof *fds);

apps/speed.c:2503:2: 
2501.   	static char sep[]=":";
2502.   
2503. > 	fds=malloc(multi*sizeof *fds);
2504.   	for(n=0 ; n < multi ; ++n)
2505.   		{

apps/speed.c:2504:6: 
2502.   
2503.   	fds=malloc(multi*sizeof *fds);
2504. > 	for(n=0 ; n < multi ; ++n)
2505.   		{
2506.   		pipe(fd);

apps/speed.c:2504:12: Loop condition is true. Entering loop body
2502.   
2503.   	fds=malloc(multi*sizeof *fds);
2504.   	for(n=0 ; n < multi ; ++n)
                   ^
2505.   		{
2506.   		pipe(fd);

apps/speed.c:2506:3: 
2504.   	for(n=0 ; n < multi ; ++n)
2505.   		{
2506. > 		pipe(fd);
2507.   		if(fork())
2508.   			{

apps/speed.c:2507:6: Taking true branch
2505.   		{
2506.   		pipe(fd);
2507.   		if(fork())
             ^
2508.   			{
2509.   			close(fd[1]);

apps/speed.c:2509:4: 
2507.   		if(fork())
2508.   			{
2509. > 			close(fd[1]);
2510.   			fds[n]=fd[0];
2511.   			}

apps/speed.c:2510:4: 
2508.   			{
2509.   			close(fd[1]);
2510. > 			fds[n]=fd[0];
2511.   			}
2512.   		else
