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

Coverity analysis defect 133850: Resource leak

    • Storage Engines
    • 1
    • StorEng - Defined Pipeline

      Resource leak.
      Potential problem as dstrdup calls malloc, so replacing whatever was in opts->tiered_storage_source, without freeing it first, will leak the old string.

      The system resource will not be reclaimed and reused, reducing the future availability of the resource. Leak of memory or pointers to system resources
      /test/utility/parse_opts.c:82: RESOURCE_LEAK 133850 Assigning: "opts->tiered_storage_source" = storage returned from "dstrdup(argv[i + 1])".
      /test/utility/parse_opts.c:82: RESOURCE_LEAK 133850 Overwriting "opts->tiered_storage_source" in "opts->tiered_storage_source = dstrdup(argv[i + 1])" leaks the storage that "opts->tiered_storage_source" points to.

            Assignee:
            backlog-server-storage-engines [DO NOT USE] Backlog - Storage Engines Team
            Reporter:
            xgen-internal-coverity Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: