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


apps/speed.c:2899:1: start of procedure do_multi()
2897.   }
2898.   
2899. > static int do_multi(int multi)
2900.   {
2901.       int n;

apps/speed.c:2904:5: 
2902.       int fd[2];
2903.       int *fds;
2904. >     static char sep[] = ":";
2905.   
2906.       fds = malloc(sizeof(*fds) * multi);

apps/speed.c:2906:5: 
2904.       static char sep[] = ":";
2905.   
2906. >     fds = malloc(sizeof(*fds) * multi);
2907.       for (n = 0; n < multi; ++n) {
2908.           if (pipe(fd) == -1) {

apps/speed.c:2907:10: 
2905.   
2906.       fds = malloc(sizeof(*fds) * multi);
2907. >     for (n = 0; n < multi; ++n) {
2908.           if (pipe(fd) == -1) {
2909.               BIO_printf(bio_err, "pipe failure\n");

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

apps/speed.c:2908:13: Taking false branch
2906.       fds = malloc(sizeof(*fds) * multi);
2907.       for (n = 0; n < multi; ++n) {
2908.           if (pipe(fd) == -1) {
                    ^
2909.               BIO_printf(bio_err, "pipe failure\n");
2910.               exit(1);

apps/speed.c:2912:9: 
2910.               exit(1);
2911.           }
2912. >         fflush(stdout);
2913.           (void)BIO_flush(bio_err);
2914.           if (fork()) {

apps/speed.c:2913:15: 
2911.           }
2912.           fflush(stdout);
2913. >         (void)BIO_flush(bio_err);
2914.           if (fork()) {
2915.               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:2913:9: 
2911.           }
2912.           fflush(stdout);
2913. >         (void)BIO_flush(bio_err);
2914.           if (fork()) {
2915.               close(fd[1]);

apps/speed.c:2914:13: Taking true branch
2912.           fflush(stdout);
2913.           (void)BIO_flush(bio_err);
2914.           if (fork()) {
                    ^
2915.               close(fd[1]);
2916.               fds[n] = fd[0];

apps/speed.c:2915:13: 
2913.           (void)BIO_flush(bio_err);
2914.           if (fork()) {
2915. >             close(fd[1]);
2916.               fds[n] = fd[0];
2917.           } else {

apps/speed.c:2916:13: 
2914.           if (fork()) {
2915.               close(fd[1]);
2916. >             fds[n] = fd[0];
2917.           } else {
2918.               close(fd[0]);
