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


apps/speed.c:2883:1: start of procedure do_multi()
2881.   }
2882.   
2883. > static int do_multi(int multi)
2884.   {
2885.       int n;

apps/speed.c:2888:5: 
2886.       int fd[2];
2887.       int *fds;
2888. >     static char sep[] = ":";
2889.   
2890.       fds = malloc(sizeof(*fds) * multi);

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

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

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

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

apps/speed.c:2896:9: 
2894.               exit(1);
2895.           }
2896. >         fflush(stdout);
2897.           (void)BIO_flush(bio_err);
2898.           if (fork()) {

apps/speed.c:2897:15: 
2895.           }
2896.           fflush(stdout);
2897. >         (void)BIO_flush(bio_err);
2898.           if (fork()) {
2899.               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:2897:9: 
2895.           }
2896.           fflush(stdout);
2897. >         (void)BIO_flush(bio_err);
2898.           if (fork()) {
2899.               close(fd[1]);

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

apps/speed.c:2899:13: 
2897.           (void)BIO_flush(bio_err);
2898.           if (fork()) {
2899. >             close(fd[1]);
2900.               fds[n] = fd[0];
2901.           } else {

apps/speed.c:2900:13: 
2898.           if (fork()) {
2899.               close(fd[1]);
2900. >             fds[n] = fd[0];
2901.           } else {
2902.               close(fd[0]);
