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


apps/speed.c:2947:1: start of procedure do_multi()
2945.   }
2946.   
2947. > static int do_multi(int multi)
2948.   {
2949.       int n;

apps/speed.c:2952:5: 
2950.       int fd[2];
2951.       int *fds;
2952. >     static char sep[] = ":";
2953.   
2954.       fds = malloc(sizeof(*fds) * multi);

apps/speed.c:2954:5: 
2952.       static char sep[] = ":";
2953.   
2954. >     fds = malloc(sizeof(*fds) * multi);
2955.       for (n = 0; n < multi; ++n) {
2956.           if (pipe(fd) == -1) {

apps/speed.c:2955:10: 
2953.   
2954.       fds = malloc(sizeof(*fds) * multi);
2955. >     for (n = 0; n < multi; ++n) {
2956.           if (pipe(fd) == -1) {
2957.               BIO_printf(bio_err, "pipe failure\n");

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

apps/speed.c:2956:13: Taking false branch
2954.       fds = malloc(sizeof(*fds) * multi);
2955.       for (n = 0; n < multi; ++n) {
2956.           if (pipe(fd) == -1) {
                    ^
2957.               BIO_printf(bio_err, "pipe failure\n");
2958.               exit(1);

apps/speed.c:2960:9: 
2958.               exit(1);
2959.           }
2960. >         fflush(stdout);
2961.           (void)BIO_flush(bio_err);
2962.           if (fork()) {

apps/speed.c:2961:15: 
2959.           }
2960.           fflush(stdout);
2961. >         (void)BIO_flush(bio_err);
2962.           if (fork()) {
2963.               close(fd[1]);

crypto/bio/bio_lib.c:359:1: start of procedure BIO_ctrl()
  357.   }
  358.   
  359. > long BIO_ctrl(BIO *b, int cmd, long larg, void *parg)
  360.   {
  361.       long ret;

crypto/bio/bio_lib.c:364:9: Taking false branch
  362.       long (*cb) (BIO *, int, const char *, int, long, long);
  363.   
  364.       if (b == NULL)
                 ^
  365.           return (0);
  366.   

crypto/bio/bio_lib.c:367:10: Taking false branch
  365.           return (0);
  366.   
  367.       if ((b->method == NULL) || (b->method->ctrl == NULL)) {
                  ^
  368.           BIOerr(BIO_F_BIO_CTRL, BIO_R_UNSUPPORTED_METHOD);
  369.           return (-2);

crypto/bio/bio_lib.c:367:33: Taking true branch
  365.           return (0);
  366.   
  367.       if ((b->method == NULL) || (b->method->ctrl == NULL)) {
                                         ^
  368.           BIOerr(BIO_F_BIO_CTRL, BIO_R_UNSUPPORTED_METHOD);
  369.           return (-2);

crypto/bio/bio_lib.c:368:9: Skipping ERR_put_error(): empty list of specs
  366.   
  367.       if ((b->method == NULL) || (b->method->ctrl == NULL)) {
  368.           BIOerr(BIO_F_BIO_CTRL, BIO_R_UNSUPPORTED_METHOD);
                 ^
  369.           return (-2);
  370.       }

crypto/bio/bio_lib.c:369:9: 
  367.       if ((b->method == NULL) || (b->method->ctrl == NULL)) {
  368.           BIOerr(BIO_F_BIO_CTRL, BIO_R_UNSUPPORTED_METHOD);
  369. >         return (-2);
  370.       }
  371.   

crypto/bio/bio_lib.c:383:1: return from a call to BIO_ctrl
  381.           ret = cb(b, BIO_CB_CTRL | BIO_CB_RETURN, parg, cmd, larg, ret);
  382.       return (ret);
  383. > }
  384.   
  385.   long BIO_callback_ctrl(BIO *b, int cmd,

apps/speed.c:2961:9: 
2959.           }
2960.           fflush(stdout);
2961. >         (void)BIO_flush(bio_err);
2962.           if (fork()) {
2963.               close(fd[1]);

apps/speed.c:2962:13: Taking true branch
2960.           fflush(stdout);
2961.           (void)BIO_flush(bio_err);
2962.           if (fork()) {
                    ^
2963.               close(fd[1]);
2964.               fds[n] = fd[0];

apps/speed.c:2963:13: 
2961.           (void)BIO_flush(bio_err);
2962.           if (fork()) {
2963. >             close(fd[1]);
2964.               fds[n] = fd[0];
2965.           } else {

apps/speed.c:2964:13: 
2962.           if (fork()) {
2963.               close(fd[1]);
2964. >             fds[n] = fd[0];
2965.           } else {
2966.               close(fd[0]);
