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


apps/speed.c:2579:1: start of procedure do_multi()
2577.   }
2578.   
2579. > static int do_multi(int multi)
2580.   {
2581.       int n;

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

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

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

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

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

apps/speed.c:2592:9: 
2590.               exit(1);
2591.           }
2592. >         fflush(stdout);
2593.           fflush(stderr);
2594.           if (fork()) {

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

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

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

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