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


apps/speed.c:2957:1: start of procedure do_multi()
2955.   }
2956.   
2957. > static int do_multi(int multi)
2958.   {
2959.       int n;

apps/speed.c:2962:5: 
2960.       int fd[2];
2961.       int *fds;
2962. >     static char sep[] = ":";
2963.   
2964.       fds = malloc(sizeof(*fds) * multi);

apps/speed.c:2964:5: 
2962.       static char sep[] = ":";
2963.   
2964. >     fds = malloc(sizeof(*fds) * multi);
2965.       for (n = 0; n < multi; ++n) {
2966.           if (pipe(fd) == -1) {

apps/speed.c:2965:10: 
2963.   
2964.       fds = malloc(sizeof(*fds) * multi);
2965. >     for (n = 0; n < multi; ++n) {
2966.           if (pipe(fd) == -1) {
2967.               BIO_printf(bio_err, "pipe failure\n");

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

apps/speed.c:2966:13: Taking false branch
2964.       fds = malloc(sizeof(*fds) * multi);
2965.       for (n = 0; n < multi; ++n) {
2966.           if (pipe(fd) == -1) {
                    ^
2967.               BIO_printf(bio_err, "pipe failure\n");
2968.               exit(1);

apps/speed.c:2970:9: 
2968.               exit(1);
2969.           }
2970. >         fflush(stdout);
2971.           (void)BIO_flush(bio_err);
2972.           if (fork()) {

apps/speed.c:2971:15: 
2969.           }
2970.           fflush(stdout);
2971. >         (void)BIO_flush(bio_err);
2972.           if (fork()) {
2973.               close(fd[1]);

crypto/bio/bio_lib.c:389:1: start of procedure BIO_ctrl()
  387.   }
  388.   
  389. > long BIO_ctrl(BIO *b, int cmd, long larg, void *parg)
  390.   {
  391.       long ret;

crypto/bio/bio_lib.c:394:9: Taking false branch
  392.       long (*cb) (BIO *, int, const char *, int, long, long);
  393.   
  394.       if (b == NULL)
                 ^
  395.           return (0);
  396.   

crypto/bio/bio_lib.c:397:10: Taking false branch
  395.           return (0);
  396.   
  397.       if ((b->method == NULL) || (b->method->ctrl == NULL)) {
                  ^
  398.           BIOerr(BIO_F_BIO_CTRL, BIO_R_UNSUPPORTED_METHOD);
  399.           return (-2);

crypto/bio/bio_lib.c:397:33: Taking true branch
  395.           return (0);
  396.   
  397.       if ((b->method == NULL) || (b->method->ctrl == NULL)) {
                                         ^
  398.           BIOerr(BIO_F_BIO_CTRL, BIO_R_UNSUPPORTED_METHOD);
  399.           return (-2);

crypto/bio/bio_lib.c:398:9: Skipping ERR_put_error(): empty list of specs
  396.   
  397.       if ((b->method == NULL) || (b->method->ctrl == NULL)) {
  398.           BIOerr(BIO_F_BIO_CTRL, BIO_R_UNSUPPORTED_METHOD);
                 ^
  399.           return (-2);
  400.       }

crypto/bio/bio_lib.c:399:9: 
  397.       if ((b->method == NULL) || (b->method->ctrl == NULL)) {
  398.           BIOerr(BIO_F_BIO_CTRL, BIO_R_UNSUPPORTED_METHOD);
  399. >         return (-2);
  400.       }
  401.   

crypto/bio/bio_lib.c:413:1: return from a call to BIO_ctrl
  411.           ret = cb(b, BIO_CB_CTRL | BIO_CB_RETURN, parg, cmd, larg, ret);
  412.       return (ret);
  413. > }
  414.   
  415.   long BIO_callback_ctrl(BIO *b, int cmd,

apps/speed.c:2971:9: 
2969.           }
2970.           fflush(stdout);
2971. >         (void)BIO_flush(bio_err);
2972.           if (fork()) {
2973.               close(fd[1]);

apps/speed.c:2972:13: Taking true branch
2970.           fflush(stdout);
2971.           (void)BIO_flush(bio_err);
2972.           if (fork()) {
                    ^
2973.               close(fd[1]);
2974.               fds[n] = fd[0];

apps/speed.c:2973:13: 
2971.           (void)BIO_flush(bio_err);
2972.           if (fork()) {
2973. >             close(fd[1]);
2974.               fds[n] = fd[0];
2975.           } else {

apps/speed.c:2974:13: 
2972.           if (fork()) {
2973.               close(fd[1]);
2974. >             fds[n] = fd[0];
2975.           } else {
2976.               close(fd[0]);
