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


apps/speed.c:2938:1: start of procedure do_multi()
2936.   }
2937.   
2938. > static int do_multi(int multi)
2939.   {
2940.       int n;

apps/speed.c:2943:5: 
2941.       int fd[2];
2942.       int *fds;
2943. >     static char sep[] = ":";
2944.   
2945.       fds = malloc(sizeof(*fds) * multi);

apps/speed.c:2945:5: 
2943.       static char sep[] = ":";
2944.   
2945. >     fds = malloc(sizeof(*fds) * multi);
2946.       for (n = 0; n < multi; ++n) {
2947.           if (pipe(fd) == -1) {

apps/speed.c:2946:10: 
2944.   
2945.       fds = malloc(sizeof(*fds) * multi);
2946. >     for (n = 0; n < multi; ++n) {
2947.           if (pipe(fd) == -1) {
2948.               BIO_printf(bio_err, "pipe failure\n");

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

apps/speed.c:2947:13: Taking false branch
2945.       fds = malloc(sizeof(*fds) * multi);
2946.       for (n = 0; n < multi; ++n) {
2947.           if (pipe(fd) == -1) {
                    ^
2948.               BIO_printf(bio_err, "pipe failure\n");
2949.               exit(1);

apps/speed.c:2951:9: 
2949.               exit(1);
2950.           }
2951. >         fflush(stdout);
2952.           (void)BIO_flush(bio_err);
2953.           if (fork()) {

apps/speed.c:2952:15: 
2950.           }
2951.           fflush(stdout);
2952. >         (void)BIO_flush(bio_err);
2953.           if (fork()) {
2954.               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:2952:9: 
2950.           }
2951.           fflush(stdout);
2952. >         (void)BIO_flush(bio_err);
2953.           if (fork()) {
2954.               close(fd[1]);

apps/speed.c:2953:13: Taking true branch
2951.           fflush(stdout);
2952.           (void)BIO_flush(bio_err);
2953.           if (fork()) {
                    ^
2954.               close(fd[1]);
2955.               fds[n] = fd[0];

apps/speed.c:2954:13: 
2952.           (void)BIO_flush(bio_err);
2953.           if (fork()) {
2954. >             close(fd[1]);
2955.               fds[n] = fd[0];
2956.           } else {

apps/speed.c:2955:13: 
2953.           if (fork()) {
2954.               close(fd[1]);
2955. >             fds[n] = fd[0];
2956.           } else {
2957.               close(fd[0]);
