Uploaded image for project: 'MongoDB Database Tools'
  1. MongoDB Database Tools
  2. TOOLS-1561

nil pointer dereference in mongoreplay when error on new playback file creation

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 3.4.1, 3.5.2
    • Affects Version/s: 3.4.0-rc3
    • Component/s: mongoreplay
    • None
    • Platforms 2017-01-23
    • v3.4

      If there is an error when creating a new playback writer, there is a nil pointer dereference on line 172:
      https://github.com/mongodb/mongo-tools/blob/fd1aa55895cc2ca774bea5ac737177d80b4c7ff3/mongoreplay/record.go#L172

      the defer should be after the error check because arguments to defer are evaluated eagerly.

            Assignee:
            gabriel.russell@mongodb.com Gabriel Russell (Inactive)
            Reporter:
            rob.clancy@intercom.io Rob Clancy
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: