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


apps/speed.c:2646:1: start of procedure do_multi()
2644.   }
2645.   
2646. > static int do_multi(int multi)
2647.   {
2648.       int n;

apps/speed.c:2651:5: 
2649.       int fd[2];
2650.       int *fds;
2651. >     static char sep[] = ":";
2652.   
2653.       fds = malloc(multi * sizeof *fds);

apps/speed.c:2653:5: 
2651.       static char sep[] = ":";
2652.   
2653. >     fds = malloc(multi * sizeof *fds);
2654.       for (n = 0; n < multi; ++n) {
2655.           if (pipe(fd) == -1) {

apps/speed.c:2654:10: 
2652.   
2653.       fds = malloc(multi * sizeof *fds);
2654. >     for (n = 0; n < multi; ++n) {
2655.           if (pipe(fd) == -1) {
2656.               fprintf(stderr, "pipe failure\n");

apps/speed.c:2654:17: Loop condition is true. Entering loop body
2652.   
2653.       fds = malloc(multi * sizeof *fds);
2654.       for (n = 0; n < multi; ++n) {
                        ^
2655.           if (pipe(fd) == -1) {
2656.               fprintf(stderr, "pipe failure\n");

apps/speed.c:2655:13: Taking false branch
2653.       fds = malloc(multi * sizeof *fds);
2654.       for (n = 0; n < multi; ++n) {
2655.           if (pipe(fd) == -1) {
                    ^
2656.               fprintf(stderr, "pipe failure\n");
2657.               exit(1);

apps/speed.c:2659:9: 
2657.               exit(1);
2658.           }
2659. >         fflush(stdout);
2660.           fflush(stderr);
2661.           if (fork()) {

apps/speed.c:2660:9: 
2658.           }
2659.           fflush(stdout);
2660. >         fflush(stderr);
2661.           if (fork()) {
2662.               close(fd[1]);

apps/speed.c:2661:13: Taking true branch
2659.           fflush(stdout);
2660.           fflush(stderr);
2661.           if (fork()) {
                    ^
2662.               close(fd[1]);
2663.               fds[n] = fd[0];

apps/speed.c:2662:13: 
2660.           fflush(stderr);
2661.           if (fork()) {
2662. >             close(fd[1]);
2663.               fds[n] = fd[0];
2664.           } else {

apps/speed.c:2663:13: 
2661.           if (fork()) {
2662.               close(fd[1]);
2663. >             fds[n] = fd[0];
2664.           } else {
2665.               close(fd[0]);
