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


apps/speed.c:2272:1: start of procedure do_multi()
2270.   }
2271.   
2272. > static int do_multi(int multi)
2273.   {
2274.       int n;

apps/speed.c:2277:5: 
2275.       int fd[2];
2276.       int *fds;
2277. >     static char sep[] = ":";
2278.   
2279.       fds = malloc(sizeof(*fds) * multi);

apps/speed.c:2279:5: 
2277.       static char sep[] = ":";
2278.   
2279. >     fds = malloc(sizeof(*fds) * multi);
2280.       for (n = 0; n < multi; ++n) {
2281.           if (pipe(fd) == -1) {

apps/speed.c:2280:10: 
2278.   
2279.       fds = malloc(sizeof(*fds) * multi);
2280. >     for (n = 0; n < multi; ++n) {
2281.           if (pipe(fd) == -1) {
2282.               BIO_printf(bio_err, "pipe failure\n");

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

apps/speed.c:2281:13: Taking false branch
2279.       fds = malloc(sizeof(*fds) * multi);
2280.       for (n = 0; n < multi; ++n) {
2281.           if (pipe(fd) == -1) {
                    ^
2282.               BIO_printf(bio_err, "pipe failure\n");
2283.               exit(1);

apps/speed.c:2285:9: 
2283.               exit(1);
2284.           }
2285. >         fflush(stdout);
2286.           (void)BIO_flush(bio_err);
2287.           if (fork()) {

apps/speed.c:2286:15: 
2284.           }
2285.           fflush(stdout);
2286. >         (void)BIO_flush(bio_err);
2287.           if (fork()) {
2288.               close(fd[1]);

crypto/bio/bio_lib.c:331:1: start of procedure BIO_ctrl()
  329.   }
  330.   
  331. > long BIO_ctrl(BIO *b, int cmd, long larg, void *parg)
  332.   {
  333.       long ret;

crypto/bio/bio_lib.c:336:9: Taking false branch
  334.       long (*cb) (BIO *, int, const char *, int, long, long);
  335.   
  336.       if (b == NULL)
                 ^
  337.           return (0);
  338.   

crypto/bio/bio_lib.c:339:10: Taking false branch
  337.           return (0);
  338.   
  339.       if ((b->method == NULL) || (b->method->ctrl == NULL)) {
                  ^
  340.           BIOerr(BIO_F_BIO_CTRL, BIO_R_UNSUPPORTED_METHOD);
  341.           return (-2);

crypto/bio/bio_lib.c:339:33: Taking true branch
  337.           return (0);
  338.   
  339.       if ((b->method == NULL) || (b->method->ctrl == NULL)) {
                                         ^
  340.           BIOerr(BIO_F_BIO_CTRL, BIO_R_UNSUPPORTED_METHOD);
  341.           return (-2);

crypto/bio/bio_lib.c:340:9: Skipping ERR_put_error(): empty list of specs
  338.   
  339.       if ((b->method == NULL) || (b->method->ctrl == NULL)) {
  340.           BIOerr(BIO_F_BIO_CTRL, BIO_R_UNSUPPORTED_METHOD);
                 ^
  341.           return (-2);
  342.       }

crypto/bio/bio_lib.c:341:9: 
  339.       if ((b->method == NULL) || (b->method->ctrl == NULL)) {
  340.           BIOerr(BIO_F_BIO_CTRL, BIO_R_UNSUPPORTED_METHOD);
  341. >         return (-2);
  342.       }
  343.   

crypto/bio/bio_lib.c:355:1: return from a call to BIO_ctrl
  353.           ret = cb(b, BIO_CB_CTRL | BIO_CB_RETURN, parg, cmd, larg, ret);
  354.       return (ret);
  355. > }
  356.   
  357.   long BIO_callback_ctrl(BIO *b, int cmd,

apps/speed.c:2286:9: 
2284.           }
2285.           fflush(stdout);
2286. >         (void)BIO_flush(bio_err);
2287.           if (fork()) {
2288.               close(fd[1]);

apps/speed.c:2287:13: Taking true branch
2285.           fflush(stdout);
2286.           (void)BIO_flush(bio_err);
2287.           if (fork()) {
                    ^
2288.               close(fd[1]);
2289.               fds[n] = fd[0];

apps/speed.c:2288:13: 
2286.           (void)BIO_flush(bio_err);
2287.           if (fork()) {
2288. >             close(fd[1]);
2289.               fds[n] = fd[0];
2290.           } else {

apps/speed.c:2289:13: 
2287.           if (fork()) {
2288.               close(fd[1]);
2289. >             fds[n] = fd[0];
2290.           } else {
2291.               close(fd[0]);
