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

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: 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 (Inactive)
              Reporter:
              Rob Clancy
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: