Coverity analysis defect 133850: Resource leak

XMLWordPrintableJSON

    • Storage Engines
    • StorEng - Defined Pipeline
    • 1

      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:
            [DO NOT USE] Backlog - Storage Engines Team
            Reporter:
            Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: