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


apps/speed.c:2602:1: start of procedure do_multi()
2600.   }
2601.   
2602. > static int do_multi(int multi)
2603.   {
2604.       int n;

apps/speed.c:2607:5: 
2605.       int fd[2];
2606.       int *fds;
2607. >     static char sep[] = ":";
2608.   
2609.       fds = malloc(multi * sizeof *fds);

apps/speed.c:2609:5: 
2607.       static char sep[] = ":";
2608.   
2609. >     fds = malloc(multi * sizeof *fds);
2610.       for (n = 0; n < multi; ++n) {
2611.           if (pipe(fd) == -1) {

apps/speed.c:2610:10: 
2608.   
2609.       fds = malloc(multi * sizeof *fds);
2610. >     for (n = 0; n < multi; ++n) {
2611.           if (pipe(fd) == -1) {
2612.               fprintf(stderr, "pipe failure\n");

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

apps/speed.c:2611:13: Taking false branch
2609.       fds = malloc(multi * sizeof *fds);
2610.       for (n = 0; n < multi; ++n) {
2611.           if (pipe(fd) == -1) {
                    ^
2612.               fprintf(stderr, "pipe failure\n");
2613.               exit(1);

apps/speed.c:2615:9: 
2613.               exit(1);
2614.           }
2615. >         fflush(stdout);
2616.           fflush(stderr);
2617.           if (fork()) {

apps/speed.c:2616:9: 
2614.           }
2615.           fflush(stdout);
2616. >         fflush(stderr);
2617.           if (fork()) {
2618.               close(fd[1]);

apps/speed.c:2617:13: Taking true branch
2615.           fflush(stdout);
2616.           fflush(stderr);
2617.           if (fork()) {
                    ^
2618.               close(fd[1]);
2619.               fds[n] = fd[0];

apps/speed.c:2618:13: 
2616.           fflush(stderr);
2617.           if (fork()) {
2618. >             close(fd[1]);
2619.               fds[n] = fd[0];
2620.           } else {

apps/speed.c:2619:13: 
2617.           if (fork()) {
2618.               close(fd[1]);
2619. >             fds[n] = fd[0];
2620.           } else {
2621.               close(fd[0]);
