From 29481ce0eb2f346854f90f64aa88c052b4f2ec91 Mon Sep 17 00:00:00 2001
From: chrfranke <chrfranke@4ea69e1a-61f1-4043-bf83-b5c94c648137>
Date: Tue, 27 Oct 2009 16:59:34 +0000
Subject: [PATCH] Fix auto_ptr initialization in
 linux_scsi_device::autodetect_open().

git-svn-id: https://smartmontools.svn.sourceforge.net/svnroot/smartmontools/trunk@2974 4ea69e1a-61f1-4043-bf83-b5c94c648137
---
 smartmontools/CHANGELOG    | 2 ++
 smartmontools/os_linux.cpp | 3 +--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/smartmontools/CHANGELOG b/smartmontools/CHANGELOG
index 0cace3c0c..bad312df7 100644
--- a/smartmontools/CHANGELOG
+++ b/smartmontools/CHANGELOG
@@ -43,6 +43,8 @@ NOTES FOR FUTURE RELEASES: see TODO file.
 
 <DEVELOPERS: ADDITIONS TO THE CHANGE LOG GO JUST BELOW HERE, PLEASE>
 
+  [CF] Fix auto_ptr initialization in linux_scsi_device::autodetect_open().
+
   [CF] Remove duplicate function smart_device_list::add().
        Replace calls with push_back().
 
diff --git a/smartmontools/os_linux.cpp b/smartmontools/os_linux.cpp
index b7aa05d48..7c485ffca 100644
--- a/smartmontools/os_linux.cpp
+++ b/smartmontools/os_linux.cpp
@@ -2689,8 +2689,7 @@ smart_device * linux_scsi_device::autodetect_open()
     //pout("Device %s: using '-d marvell' for ATA disk with Marvell driver\n", get_dev_name());
     close();
     smart_device_auto_ptr newdev(
-      new linux_marvell_device(smi(), get_dev_name(), get_req_type()),
-      this
+      new linux_marvell_device(smi(), get_dev_name(), get_req_type())
     );
     newdev->open(); // TODO: Can possibly pass open fd
     delete this;
-- 
GitLab