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


apps/speed.c:3110:1: start of procedure do_multi()
3108.   }
3109.   
3110. > static int do_multi(int multi, int size_num)
3111.   {
3112.       int n;

apps/speed.c:3115:5: 
3113.       int fd[2];
3114.       int *fds;
3115. >     static char sep[] = ":";
3116.   
3117.       fds = malloc(sizeof(*fds) * multi);

apps/speed.c:3117:5: 
3115.       static char sep[] = ":";
3116.   
3117. >     fds = malloc(sizeof(*fds) * multi);
3118.       for (n = 0; n < multi; ++n) {
3119.           if (pipe(fd) == -1) {

apps/speed.c:3118:10: 
3116.   
3117.       fds = malloc(sizeof(*fds) * multi);
3118. >     for (n = 0; n < multi; ++n) {
3119.           if (pipe(fd) == -1) {
3120.               BIO_printf(bio_err, "pipe failure\n");

apps/speed.c:3118:17: Loop condition is true. Entering loop body
3116.   
3117.       fds = malloc(sizeof(*fds) * multi);
3118.       for (n = 0; n < multi; ++n) {
                        ^
3119.           if (pipe(fd) == -1) {
3120.               BIO_printf(bio_err, "pipe failure\n");

apps/speed.c:3119:13: Taking false branch
3117.       fds = malloc(sizeof(*fds) * multi);
3118.       for (n = 0; n < multi; ++n) {
3119.           if (pipe(fd) == -1) {
                    ^
3120.               BIO_printf(bio_err, "pipe failure\n");
3121.               exit(1);

apps/speed.c:3123:9: 
3121.               exit(1);
3122.           }
3123. >         fflush(stdout);
3124.           (void)BIO_flush(bio_err);
3125.           if (fork()) {

apps/speed.c:3124:15: 
3122.           }
3123.           fflush(stdout);
3124. >         (void)BIO_flush(bio_err);
3125.           if (fork()) {
3126.               close(fd[1]);

crypto/bio/bio_lib.c:510:1: start of procedure BIO_ctrl()
  508.   }
  509.   
  510. > long BIO_ctrl(BIO *b, int cmd, long larg, void *parg)
  511.   {
  512.       long ret;

crypto/bio/bio_lib.c:514:9: Taking false branch
  512.       long ret;
  513.   
  514.       if (b == NULL)
                 ^
  515.           return 0;
  516.   

crypto/bio/bio_lib.c:517:10: Taking false branch
  515.           return 0;
  516.   
  517.       if ((b->method == NULL) || (b->method->ctrl == NULL)) {
                  ^
  518.           BIOerr(BIO_F_BIO_CTRL, BIO_R_UNSUPPORTED_METHOD);
  519.           return -2;

crypto/bio/bio_lib.c:517:33: Taking true branch
  515.           return 0;
  516.   
  517.       if ((b->method == NULL) || (b->method->ctrl == NULL)) {
                                         ^
  518.           BIOerr(BIO_F_BIO_CTRL, BIO_R_UNSUPPORTED_METHOD);
  519.           return -2;

crypto/bio/bio_lib.c:518:9: Skipping ERR_put_error(): empty list of specs
  516.   
  517.       if ((b->method == NULL) || (b->method->ctrl == NULL)) {
  518.           BIOerr(BIO_F_BIO_CTRL, BIO_R_UNSUPPORTED_METHOD);
                 ^
  519.           return -2;
  520.       }

crypto/bio/bio_lib.c:519:9: 
  517.       if ((b->method == NULL) || (b->method->ctrl == NULL)) {
  518.           BIOerr(BIO_F_BIO_CTRL, BIO_R_UNSUPPORTED_METHOD);
  519. >         return -2;
  520.       }
  521.   

crypto/bio/bio_lib.c:535:1: return from a call to BIO_ctrl
  533.   
  534.       return ret;
  535. > }
  536.   
  537.   long BIO_callback_ctrl(BIO *b, int cmd, BIO_info_cb *fp)

apps/speed.c:3124:9: 
3122.           }
3123.           fflush(stdout);
3124. >         (void)BIO_flush(bio_err);
3125.           if (fork()) {
3126.               close(fd[1]);

apps/speed.c:3125:13: Taking true branch
3123.           fflush(stdout);
3124.           (void)BIO_flush(bio_err);
3125.           if (fork()) {
                    ^
3126.               close(fd[1]);
3127.               fds[n] = fd[0];

apps/speed.c:3126:13: 
3124.           (void)BIO_flush(bio_err);
3125.           if (fork()) {
3126. >             close(fd[1]);
3127.               fds[n] = fd[0];
3128.           } else {

apps/speed.c:3127:13: 
3125.           if (fork()) {
3126.               close(fd[1]);
3127. >             fds[n] = fd[0];
3128.           } else {
3129.               close(fd[0]);
