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


apps/speed.c:2879:1: start of procedure do_multi()
2877.   }
2878.   
2879. > static int do_multi(int multi)
2880.   {
2881.       int n;

apps/speed.c:2884:5: 
2882.       int fd[2];
2883.       int *fds;
2884. >     static char sep[] = ":";
2885.   
2886.       fds = malloc(sizeof(*fds) * multi);

apps/speed.c:2886:5: 
2884.       static char sep[] = ":";
2885.   
2886. >     fds = malloc(sizeof(*fds) * multi);
2887.       for (n = 0; n < multi; ++n) {
2888.           if (pipe(fd) == -1) {

apps/speed.c:2887:10: 
2885.   
2886.       fds = malloc(sizeof(*fds) * multi);
2887. >     for (n = 0; n < multi; ++n) {
2888.           if (pipe(fd) == -1) {
2889.               BIO_printf(bio_err, "pipe failure\n");

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

apps/speed.c:2888:13: Taking false branch
2886.       fds = malloc(sizeof(*fds) * multi);
2887.       for (n = 0; n < multi; ++n) {
2888.           if (pipe(fd) == -1) {
                    ^
2889.               BIO_printf(bio_err, "pipe failure\n");
2890.               exit(1);

apps/speed.c:2892:9: 
2890.               exit(1);
2891.           }
2892. >         fflush(stdout);
2893.           (void)BIO_flush(bio_err);
2894.           if (fork()) {

apps/speed.c:2893:15: 
2891.           }
2892.           fflush(stdout);
2893. >         (void)BIO_flush(bio_err);
2894.           if (fork()) {
2895.               close(fd[1]);

crypto/bio/bio_lib.c:343:1: start of procedure BIO_ctrl()
  341.   }
  342.   
  343. > long BIO_ctrl(BIO *b, int cmd, long larg, void *parg)
  344.   {
  345.       long ret;

crypto/bio/bio_lib.c:348:9: Taking false branch
  346.       long (*cb) (BIO *, int, const char *, int, long, long);
  347.   
  348.       if (b == NULL)
                 ^
  349.           return (0);
  350.   

crypto/bio/bio_lib.c:351:10: Taking false branch
  349.           return (0);
  350.   
  351.       if ((b->method == NULL) || (b->method->ctrl == NULL)) {
                  ^
  352.           BIOerr(BIO_F_BIO_CTRL, BIO_R_UNSUPPORTED_METHOD);
  353.           return (-2);

crypto/bio/bio_lib.c:351:33: Taking true branch
  349.           return (0);
  350.   
  351.       if ((b->method == NULL) || (b->method->ctrl == NULL)) {
                                         ^
  352.           BIOerr(BIO_F_BIO_CTRL, BIO_R_UNSUPPORTED_METHOD);
  353.           return (-2);

crypto/bio/bio_lib.c:352:9: Skipping ERR_put_error(): empty list of specs
  350.   
  351.       if ((b->method == NULL) || (b->method->ctrl == NULL)) {
  352.           BIOerr(BIO_F_BIO_CTRL, BIO_R_UNSUPPORTED_METHOD);
                 ^
  353.           return (-2);
  354.       }

crypto/bio/bio_lib.c:353:9: 
  351.       if ((b->method == NULL) || (b->method->ctrl == NULL)) {
  352.           BIOerr(BIO_F_BIO_CTRL, BIO_R_UNSUPPORTED_METHOD);
  353. >         return (-2);
  354.       }
  355.   

crypto/bio/bio_lib.c:367:1: return from a call to BIO_ctrl
  365.           ret = cb(b, BIO_CB_CTRL | BIO_CB_RETURN, parg, cmd, larg, ret);
  366.       return (ret);
  367. > }
  368.   
  369.   long BIO_callback_ctrl(BIO *b, int cmd,

apps/speed.c:2893:9: 
2891.           }
2892.           fflush(stdout);
2893. >         (void)BIO_flush(bio_err);
2894.           if (fork()) {
2895.               close(fd[1]);

apps/speed.c:2894:13: Taking true branch
2892.           fflush(stdout);
2893.           (void)BIO_flush(bio_err);
2894.           if (fork()) {
                    ^
2895.               close(fd[1]);
2896.               fds[n] = fd[0];

apps/speed.c:2895:13: 
2893.           (void)BIO_flush(bio_err);
2894.           if (fork()) {
2895. >             close(fd[1]);
2896.               fds[n] = fd[0];
2897.           } else {

apps/speed.c:2896:13: 
2894.           if (fork()) {
2895.               close(fd[1]);
2896. >             fds[n] = fd[0];
2897.           } else {
2898.               close(fd[0]);
