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


apps/speed.c:2926:1: start of procedure do_multi()
2924.   }
2925.   
2926. > static int do_multi(int multi)
2927.   {
2928.       int n;

apps/speed.c:2931:5: 
2929.       int fd[2];
2930.       int *fds;
2931. >     static char sep[] = ":";
2932.   
2933.       fds = malloc(sizeof(*fds) * multi);

apps/speed.c:2933:5: 
2931.       static char sep[] = ":";
2932.   
2933. >     fds = malloc(sizeof(*fds) * multi);
2934.       for (n = 0; n < multi; ++n) {
2935.           if (pipe(fd) == -1) {

apps/speed.c:2934:10: 
2932.   
2933.       fds = malloc(sizeof(*fds) * multi);
2934. >     for (n = 0; n < multi; ++n) {
2935.           if (pipe(fd) == -1) {
2936.               BIO_printf(bio_err, "pipe failure\n");

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

apps/speed.c:2935:13: Taking false branch
2933.       fds = malloc(sizeof(*fds) * multi);
2934.       for (n = 0; n < multi; ++n) {
2935.           if (pipe(fd) == -1) {
                    ^
2936.               BIO_printf(bio_err, "pipe failure\n");
2937.               exit(1);

apps/speed.c:2939:9: 
2937.               exit(1);
2938.           }
2939. >         fflush(stdout);
2940.           (void)BIO_flush(bio_err);
2941.           if (fork()) {

apps/speed.c:2940:15: 
2938.           }
2939.           fflush(stdout);
2940. >         (void)BIO_flush(bio_err);
2941.           if (fork()) {
2942.               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:2940:9: 
2938.           }
2939.           fflush(stdout);
2940. >         (void)BIO_flush(bio_err);
2941.           if (fork()) {
2942.               close(fd[1]);

apps/speed.c:2941:13: Taking true branch
2939.           fflush(stdout);
2940.           (void)BIO_flush(bio_err);
2941.           if (fork()) {
                    ^
2942.               close(fd[1]);
2943.               fds[n] = fd[0];

apps/speed.c:2942:13: 
2940.           (void)BIO_flush(bio_err);
2941.           if (fork()) {
2942. >             close(fd[1]);
2943.               fds[n] = fd[0];
2944.           } else {

apps/speed.c:2943:13: 
2941.           if (fork()) {
2942.               close(fd[1]);
2943. >             fds[n] = fd[0];
2944.           } else {
2945.               close(fd[0]);
