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


apps/speed.c:2869:1: start of procedure do_multi()
2867.   }
2868.   
2869. > static int do_multi(int multi)
2870.   {
2871.       int n;

apps/speed.c:2874:5: 
2872.       int fd[2];
2873.       int *fds;
2874. >     static char sep[] = ":";
2875.   
2876.       fds = malloc(sizeof(*fds) * multi);

apps/speed.c:2876:5: 
2874.       static char sep[] = ":";
2875.   
2876. >     fds = malloc(sizeof(*fds) * multi);
2877.       for (n = 0; n < multi; ++n) {
2878.           if (pipe(fd) == -1) {

apps/speed.c:2877:10: 
2875.   
2876.       fds = malloc(sizeof(*fds) * multi);
2877. >     for (n = 0; n < multi; ++n) {
2878.           if (pipe(fd) == -1) {
2879.               BIO_printf(bio_err, "pipe failure\n");

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

apps/speed.c:2878:13: Taking false branch
2876.       fds = malloc(sizeof(*fds) * multi);
2877.       for (n = 0; n < multi; ++n) {
2878.           if (pipe(fd) == -1) {
                    ^
2879.               BIO_printf(bio_err, "pipe failure\n");
2880.               exit(1);

apps/speed.c:2882:9: 
2880.               exit(1);
2881.           }
2882. >         fflush(stdout);
2883.           (void)BIO_flush(bio_err);
2884.           if (fork()) {

apps/speed.c:2883:15: 
2881.           }
2882.           fflush(stdout);
2883. >         (void)BIO_flush(bio_err);
2884.           if (fork()) {
2885.               close(fd[1]);

crypto/bio/bio_lib.c:327:1: start of procedure BIO_ctrl()
  325.   }
  326.   
  327. > long BIO_ctrl(BIO *b, int cmd, long larg, void *parg)
  328.   {
  329.       long ret;

crypto/bio/bio_lib.c:332:9: Taking false branch
  330.       long (*cb) (BIO *, int, const char *, int, long, long);
  331.   
  332.       if (b == NULL)
                 ^
  333.           return (0);
  334.   

crypto/bio/bio_lib.c:335:10: Taking false branch
  333.           return (0);
  334.   
  335.       if ((b->method == NULL) || (b->method->ctrl == NULL)) {
                  ^
  336.           BIOerr(BIO_F_BIO_CTRL, BIO_R_UNSUPPORTED_METHOD);
  337.           return (-2);

crypto/bio/bio_lib.c:335:33: Taking true branch
  333.           return (0);
  334.   
  335.       if ((b->method == NULL) || (b->method->ctrl == NULL)) {
                                         ^
  336.           BIOerr(BIO_F_BIO_CTRL, BIO_R_UNSUPPORTED_METHOD);
  337.           return (-2);

crypto/bio/bio_lib.c:336:9: Skipping ERR_put_error(): empty list of specs
  334.   
  335.       if ((b->method == NULL) || (b->method->ctrl == NULL)) {
  336.           BIOerr(BIO_F_BIO_CTRL, BIO_R_UNSUPPORTED_METHOD);
                 ^
  337.           return (-2);
  338.       }

crypto/bio/bio_lib.c:337:9: 
  335.       if ((b->method == NULL) || (b->method->ctrl == NULL)) {
  336.           BIOerr(BIO_F_BIO_CTRL, BIO_R_UNSUPPORTED_METHOD);
  337. >         return (-2);
  338.       }
  339.   

crypto/bio/bio_lib.c:351:1: return from a call to BIO_ctrl
  349.           ret = cb(b, BIO_CB_CTRL | BIO_CB_RETURN, parg, cmd, larg, ret);
  350.       return (ret);
  351. > }
  352.   
  353.   long BIO_callback_ctrl(BIO *b, int cmd,

apps/speed.c:2883:9: 
2881.           }
2882.           fflush(stdout);
2883. >         (void)BIO_flush(bio_err);
2884.           if (fork()) {
2885.               close(fd[1]);

apps/speed.c:2884:13: Taking true branch
2882.           fflush(stdout);
2883.           (void)BIO_flush(bio_err);
2884.           if (fork()) {
                    ^
2885.               close(fd[1]);
2886.               fds[n] = fd[0];

apps/speed.c:2885:13: 
2883.           (void)BIO_flush(bio_err);
2884.           if (fork()) {
2885. >             close(fd[1]);
2886.               fds[n] = fd[0];
2887.           } else {

apps/speed.c:2886:13: 
2884.           if (fork()) {
2885.               close(fd[1]);
2886. >             fds[n] = fd[0];
2887.           } else {
2888.               close(fd[0]);
