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


apps/speed.c:2582:1: start of procedure do_multi()
2580.   }
2581.   
2582. > static int do_multi(int multi)
2583.   {
2584.       int n;

apps/speed.c:2587:5: 
2585.       int fd[2];
2586.       int *fds;
2587. >     static char sep[] = ":";
2588.   
2589.       fds = malloc(multi * sizeof *fds);

apps/speed.c:2589:5: 
2587.       static char sep[] = ":";
2588.   
2589. >     fds = malloc(multi * sizeof *fds);
2590.       for (n = 0; n < multi; ++n) {
2591.           if (pipe(fd) == -1) {

apps/speed.c:2590:10: 
2588.   
2589.       fds = malloc(multi * sizeof *fds);
2590. >     for (n = 0; n < multi; ++n) {
2591.           if (pipe(fd) == -1) {
2592.               fprintf(stderr, "pipe failure\n");

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

apps/speed.c:2591:13: Taking false branch
2589.       fds = malloc(multi * sizeof *fds);
2590.       for (n = 0; n < multi; ++n) {
2591.           if (pipe(fd) == -1) {
                    ^
2592.               fprintf(stderr, "pipe failure\n");
2593.               exit(1);

apps/speed.c:2595:9: 
2593.               exit(1);
2594.           }
2595. >         fflush(stdout);
2596.           fflush(stderr);
2597.           if (fork()) {

apps/speed.c:2596:9: 
2594.           }
2595.           fflush(stdout);
2596. >         fflush(stderr);
2597.           if (fork()) {
2598.               close(fd[1]);

apps/speed.c:2597:13: Taking true branch
2595.           fflush(stdout);
2596.           fflush(stderr);
2597.           if (fork()) {
                    ^
2598.               close(fd[1]);
2599.               fds[n] = fd[0];

apps/speed.c:2598:13: 
2596.           fflush(stderr);
2597.           if (fork()) {
2598. >             close(fd[1]);
2599.               fds[n] = fd[0];
2600.           } else {

apps/speed.c:2599:13: 
2597.           if (fork()) {
2598.               close(fd[1]);
2599. >             fds[n] = fd[0];
2600.           } else {
2601.               close(fd[0]);
