Uploaded image for project: 'WiredTiger'
  1. WiredTiger
  2. WT-2468

Coverity 1352896: Explicit null dereferenced

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • WT2.8.0
    • Affects Version/s: None
    • Component/s: None
    • None

      test/readonly/readonly.c

       87                cfg = ENV_CONFIG_RD;
       88        else
       89                cfg = ENV_CONFIG_WR;
         	3. write_zero_model: Passing &conn to wiredtiger_open, which sets conn to NULL. [show details]
       90        ret = wiredtiger_open(homedir, NULL, cfg, &conn);
         	4. Condition expect == 0, taking false branch
       91        if (expect == EXPECT_SUCCESS && ret != 0)
       92                testutil_die(ret, "wiredtiger_open success err");
         	5. Condition expect == 1, taking false branch
       93        if (expect == EXPECT_ERR) {
       94                if (ret == 0)
       95                        testutil_die(
       96                            ret, "wiredtiger_open expected err succeeded");
       97                /*
       98                 * If we expect an error and got one, we're done.
       99                 */
      100                return (0);
      101        }
      102
      103        /*
      104         * Make sure we can read the data.
      105         */
         	
      CID 1352896 (#1 of 1): Explicit null dereferenced (FORWARD_NULL)
      6. var_deref_op: Dereferencing null pointer conn.
      106        if ((ret = conn->open_session(conn, NULL, NULL, &session)) != 0)
      107                testutil_die(ret, "WT_CONNECTION:open_session");
      

            Assignee:
            keith.bostic@mongodb.com Keith Bostic (Inactive)
            Reporter:
            keith.bostic@mongodb.com Keith Bostic (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: