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


apps/speed.c:2617:1: start of procedure do_multi()
2615.       }
2616.   
2617. > static int do_multi(int multi)
2618.   	{
2619.   	int n;

apps/speed.c:2622:2: 
2620.   	int fd[2];
2621.   	int *fds;
2622. > 	static char sep[]=":";
2623.   
2624.   	fds=malloc(multi*sizeof *fds);

apps/speed.c:2624:2: 
2622.   	static char sep[]=":";
2623.   
2624. > 	fds=malloc(multi*sizeof *fds);
2625.   	for(n=0 ; n < multi ; ++n)
2626.   		{

apps/speed.c:2625:6: 
2623.   
2624.   	fds=malloc(multi*sizeof *fds);
2625. > 	for(n=0 ; n < multi ; ++n)
2626.   		{
2627.   		pipe(fd);

apps/speed.c:2625:12: Loop condition is true. Entering loop body
2623.   
2624.   	fds=malloc(multi*sizeof *fds);
2625.   	for(n=0 ; n < multi ; ++n)
                   ^
2626.   		{
2627.   		pipe(fd);

apps/speed.c:2627:3: 
2625.   	for(n=0 ; n < multi ; ++n)
2626.   		{
2627. > 		pipe(fd);
2628.   		fflush(stdout);
2629.   		fflush(stderr);

apps/speed.c:2628:3: 
2626.   		{
2627.   		pipe(fd);
2628. > 		fflush(stdout);
2629.   		fflush(stderr);
2630.   		if(fork())

apps/speed.c:2629:3: 
2627.   		pipe(fd);
2628.   		fflush(stdout);
2629. > 		fflush(stderr);
2630.   		if(fork())
2631.   			{

apps/speed.c:2630:6: Taking true branch
2628.   		fflush(stdout);
2629.   		fflush(stderr);
2630.   		if(fork())
             ^
2631.   			{
2632.   			close(fd[1]);

apps/speed.c:2632:4: 
2630.   		if(fork())
2631.   			{
2632. > 			close(fd[1]);
2633.   			fds[n]=fd[0];
2634.   			}

apps/speed.c:2633:4: 
2631.   			{
2632.   			close(fd[1]);
2633. > 			fds[n]=fd[0];
2634.   			}
2635.   		else
