Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-23504

Coverity analysis defect 98177: Resource leak

    Details

    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Completed:

      Description

      Leak of memory or pointers to system resources

      Defect 98177 (STATIC_C)
      Checker RESOURCE_LEAK (subcategory none)
      File: /src/third_party/wiredtiger/src/cursor/cur_backup.c
      Function __backup_list_uri_append
      /src/third_party/wiredtiger/src/cursor/cur_backup.c, line: 475
      Resource "value" is not freed or pointed-to in "__wt_fprintf".

          	WT_RET(__wt_fprintf(cb->bfp, "%s\n%s\n", name, value));

      /src/third_party/wiredtiger/src/cursor/cur_backup.c, line: 475
      Variable "value" going out of scope leaks the storage it points to.

          	WT_RET(__wt_fprintf(cb->bfp, "%s\n%s\n", name, value));

        Issue Links

          Activity

          Hide
          milkie Eric Milkie added a comment -

          I think it's saying that the fprintf() can fail, and when it does, we return early and miss the free of the variable named "value".

          Show
          milkie Eric Milkie added a comment - I think it's saying that the fprintf() can fail, and when it does, we return early and miss the free of the variable named "value".
          Hide
          xgen-internal-githook Githook User added a comment -

          Author:

          {u'username': u'keithbostic', u'name': u'Keith Bostic', u'email': u'keith@wiredtiger.com'}

          Message: SERVER-23504: Coverity analysis defect 98177: Resource leak

          Don't leak the variable value if the call to __wt_fprintf fails.
          Branch: develop
          https://github.com/wiredtiger/wiredtiger/commit/77caa9415b05f064d3c5e3c953e5ab7a2d7b7eec

          Show
          xgen-internal-githook Githook User added a comment - Author: {u'username': u'keithbostic', u'name': u'Keith Bostic', u'email': u'keith@wiredtiger.com'} Message: SERVER-23504 : Coverity analysis defect 98177: Resource leak Don't leak the variable value if the call to __wt_fprintf fails. Branch: develop https://github.com/wiredtiger/wiredtiger/commit/77caa9415b05f064d3c5e3c953e5ab7a2d7b7eec
          Hide
          xgen-internal-githook Githook User added a comment -

          Author:

          {u'username': u'agorrod', u'name': u'Alex Gorrod', u'email': u'alexander.gorrod@mongodb.com'}

          Message: Merge pull request #2631 from wiredtiger/server-23504

          SERVER-23504: Coverity analysis defect 98177: Resource leak
          Branch: develop
          https://github.com/wiredtiger/wiredtiger/commit/47b5268e9d1239ccc6a923ea9915a820645080df

          Show
          xgen-internal-githook Githook User added a comment - Author: {u'username': u'agorrod', u'name': u'Alex Gorrod', u'email': u'alexander.gorrod@mongodb.com'} Message: Merge pull request #2631 from wiredtiger/server-23504 SERVER-23504 : Coverity analysis defect 98177: Resource leak Branch: develop https://github.com/wiredtiger/wiredtiger/commit/47b5268e9d1239ccc6a923ea9915a820645080df
          Hide
          xgen-internal-githook Githook User added a comment -

          Author:

          {u'username': u'keithbostic', u'name': u'Keith Bostic', u'email': u'keith@wiredtiger.com'}

          Message: SERVER-23504: Coverity analysis defect 98177: Resource leak

          Don't leak the variable value if the call to __wt_fprintf fails.
          Branch: mongodb-3.4
          https://github.com/wiredtiger/wiredtiger/commit/77caa9415b05f064d3c5e3c953e5ab7a2d7b7eec

          Show
          xgen-internal-githook Githook User added a comment - Author: {u'username': u'keithbostic', u'name': u'Keith Bostic', u'email': u'keith@wiredtiger.com'} Message: SERVER-23504 : Coverity analysis defect 98177: Resource leak Don't leak the variable value if the call to __wt_fprintf fails. Branch: mongodb-3.4 https://github.com/wiredtiger/wiredtiger/commit/77caa9415b05f064d3c5e3c953e5ab7a2d7b7eec
          Hide
          xgen-internal-githook Githook User added a comment -

          Author:

          {u'username': u'agorrod', u'name': u'Alex Gorrod', u'email': u'alexander.gorrod@mongodb.com'}

          Message: Merge pull request #2631 from wiredtiger/server-23504

          SERVER-23504: Coverity analysis defect 98177: Resource leak
          Branch: mongodb-3.4
          https://github.com/wiredtiger/wiredtiger/commit/47b5268e9d1239ccc6a923ea9915a820645080df

          Show
          xgen-internal-githook Githook User added a comment - Author: {u'username': u'agorrod', u'name': u'Alex Gorrod', u'email': u'alexander.gorrod@mongodb.com'} Message: Merge pull request #2631 from wiredtiger/server-23504 SERVER-23504 : Coverity analysis defect 98177: Resource leak Branch: mongodb-3.4 https://github.com/wiredtiger/wiredtiger/commit/47b5268e9d1239ccc6a923ea9915a820645080df
          Hide
          xgen-internal-githook Githook User added a comment -

          Author:

          {u'username': u'agorrod', u'name': u'Alex Gorrod', u'email': u'alexg@wiredtiger.com'}

          Message: Import wiredtiger-wiredtiger-2.8.0-134-g5047aab.tar.gz from wiredtiger branch mongodb-3.4

          ref: 9cf8eb2..5047aab

          SERVER-23504 Coverity analysis defect 98177: Resource leak
          WT-2330 in-memory configurations should not create on-disk collection files
          WT-2513 conversion from 'int64_t' to 'uint32_t'
          WT-2522 Incorrect format code in message
          WT-2525 in-memory configurations: miscellaneous cleanups
          WT-2527 OS X compile error, missing POSIX_FADV_WILLNEED #define
          WT-2528 style error in WiredTiger build
          WT-2529 The readonly test case is crashing with a stack overflow
          WT-2531 in-memory tables are allocating unnecessary memory
          WT-2532 WT_STREAM_APPEND and WT_STREAM_LINE_BUFFER flag overlap
          WT-2533 Ensure that in-memory tables don't report a zero size
          SERVER-23517 WiredTiger changes for MongoDB 3.3.5
          Branch: master
          https://github.com/mongodb/mongo/commit/de6f136d83b20f8a58ba6fe4ba02be229b6c9159

          Show
          xgen-internal-githook Githook User added a comment - Author: {u'username': u'agorrod', u'name': u'Alex Gorrod', u'email': u'alexg@wiredtiger.com'} Message: Import wiredtiger-wiredtiger-2.8.0-134-g5047aab.tar.gz from wiredtiger branch mongodb-3.4 ref: 9cf8eb2..5047aab SERVER-23504 Coverity analysis defect 98177: Resource leak WT-2330 in-memory configurations should not create on-disk collection files WT-2513 conversion from 'int64_t' to 'uint32_t' WT-2522 Incorrect format code in message WT-2525 in-memory configurations: miscellaneous cleanups WT-2527 OS X compile error, missing POSIX_FADV_WILLNEED #define WT-2528 style error in WiredTiger build WT-2529 The readonly test case is crashing with a stack overflow WT-2531 in-memory tables are allocating unnecessary memory WT-2532 WT_STREAM_APPEND and WT_STREAM_LINE_BUFFER flag overlap WT-2533 Ensure that in-memory tables don't report a zero size SERVER-23517 WiredTiger changes for MongoDB 3.3.5 Branch: master https://github.com/mongodb/mongo/commit/de6f136d83b20f8a58ba6fe4ba02be229b6c9159
          Hide
          xgen-internal-githook Githook User added a comment -

          Author:

          {u'username': u'keithbostic', u'name': u'Keith Bostic', u'email': u'keith@wiredtiger.com'}

          Message: SERVER-23504: Coverity analysis defect 98177: Resource leak

          Don't leak the variable value if the call to __wt_fprintf fails.
          Branch: mongodb-3.2
          https://github.com/wiredtiger/wiredtiger/commit/77caa9415b05f064d3c5e3c953e5ab7a2d7b7eec

          Show
          xgen-internal-githook Githook User added a comment - Author: {u'username': u'keithbostic', u'name': u'Keith Bostic', u'email': u'keith@wiredtiger.com'} Message: SERVER-23504 : Coverity analysis defect 98177: Resource leak Don't leak the variable value if the call to __wt_fprintf fails. Branch: mongodb-3.2 https://github.com/wiredtiger/wiredtiger/commit/77caa9415b05f064d3c5e3c953e5ab7a2d7b7eec
          Hide
          xgen-internal-githook Githook User added a comment -

          Author:

          {u'username': u'agorrod', u'name': u'Alex Gorrod', u'email': u'alexander.gorrod@mongodb.com'}

          Message: Merge pull request #2631 from wiredtiger/server-23504

          SERVER-23504: Coverity analysis defect 98177: Resource leak
          Branch: mongodb-3.2
          https://github.com/wiredtiger/wiredtiger/commit/47b5268e9d1239ccc6a923ea9915a820645080df

          Show
          xgen-internal-githook Githook User added a comment - Author: {u'username': u'agorrod', u'name': u'Alex Gorrod', u'email': u'alexander.gorrod@mongodb.com'} Message: Merge pull request #2631 from wiredtiger/server-23504 SERVER-23504 : Coverity analysis defect 98177: Resource leak Branch: mongodb-3.2 https://github.com/wiredtiger/wiredtiger/commit/47b5268e9d1239ccc6a923ea9915a820645080df
          Hide
          xgen-internal-githook Githook User added a comment -

          Author:

          {u'name': u'Ramon Fernandez', u'email': u'ramon@mongodb.com'}

          Message: Import wiredtiger-wiredtiger-2.8.0-201-g7ea2631.tar.gz from wiredtiger branch mongodb-3.2

          ref: 43e885a..7ea2631

          SERVER-23504 Coverity analysis defect 98177: Resource leak
          SERVER-23526 Replication relies on storage engines reporting a non-zero size for correctness
          SERVER-23588 mongod with WiredTiger won't start on Windows when built with --dbg=on --opt=off
          SERVER-23682 WiredTiger changes for MongoDB 3.2.6
          WT-2330 in-memory configurations should not create on-disk collection files
          WT-2507 Add upgrading documentation in preparation for 2.8 release.
          WT-2512 wtperf: MSVC complains about float conversion in throttle code
          WT-2513 conversion from 'int64_t' to 'uint32_t'
          WT-2517 wtperf uses setvbuf in a way that isn't supported on Windows
          WT-2522 Incorrect format code in message
          WT-2525 in-memory configurations: miscellaneous cleanups
          WT-2527 OS X compile error, missing POSIX_FADV_WILLNEED #define
          WT-2528 style error in WiredTiger build
          WT-2529 The readonly test case is crashing with a stack overflow
          WT-2531 in-memory tables are allocating unnecessary memory
          WT-2532 WT_STREAM_APPEND and WT_STREAM_LINE_BUFFER flag overlap
          WT-2533 Ensure that in-memory tables don't report a zero size
          WT-2534 Invalid transaction snapshots on PowerPC
          Branch: v3.2
          https://github.com/mongodb/mongo/commit/7ee4e4e493c3785fea489ee3508ca18526709c16

          Show
          xgen-internal-githook Githook User added a comment - Author: {u'name': u'Ramon Fernandez', u'email': u'ramon@mongodb.com'} Message: Import wiredtiger-wiredtiger-2.8.0-201-g7ea2631.tar.gz from wiredtiger branch mongodb-3.2 ref: 43e885a..7ea2631 SERVER-23504 Coverity analysis defect 98177: Resource leak SERVER-23526 Replication relies on storage engines reporting a non-zero size for correctness SERVER-23588 mongod with WiredTiger won't start on Windows when built with --dbg=on --opt=off SERVER-23682 WiredTiger changes for MongoDB 3.2.6 WT-2330 in-memory configurations should not create on-disk collection files WT-2507 Add upgrading documentation in preparation for 2.8 release. WT-2512 wtperf: MSVC complains about float conversion in throttle code WT-2513 conversion from 'int64_t' to 'uint32_t' WT-2517 wtperf uses setvbuf in a way that isn't supported on Windows WT-2522 Incorrect format code in message WT-2525 in-memory configurations: miscellaneous cleanups WT-2527 OS X compile error, missing POSIX_FADV_WILLNEED #define WT-2528 style error in WiredTiger build WT-2529 The readonly test case is crashing with a stack overflow WT-2531 in-memory tables are allocating unnecessary memory WT-2532 WT_STREAM_APPEND and WT_STREAM_LINE_BUFFER flag overlap WT-2533 Ensure that in-memory tables don't report a zero size WT-2534 Invalid transaction snapshots on PowerPC Branch: v3.2 https://github.com/mongodb/mongo/commit/7ee4e4e493c3785fea489ee3508ca18526709c16

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: