Blame SOURCES/0015-osutils-Using-delete-instead-of-delete.patch

99c779
From 9bbce4d54c1d54b660ec04b18d507f20a2a31ccf Mon Sep 17 00:00:00 2001
99c779
From: Erwan Velu <erwan@redhat.com>
99c779
Date: Mon, 26 Sep 2016 22:18:12 +0200
99c779
Subject: [PATCH 15/43] osutils: Using delete[] instead of delete
99c779
99c779
When compiling lshw, we get a warning regarding the usage of delete.
99c779
99c779
    osutils.cc:425:3: warning: Memory allocated by 'new[]' should be deallocated by 'delete[]', not 'delete'
99c779
99c779
This commit simply use the proper delete operator for this operation.
99c779
---
99c779
 src/core/osutils.cc | 2 +-
99c779
 1 file changed, 1 insertion(+), 1 deletion(-)
99c779
99c779
diff --git a/src/core/osutils.cc b/src/core/osutils.cc
99c779
index 95c8483..cc03dc4 100644
99c779
--- a/src/core/osutils.cc
99c779
+++ b/src/core/osutils.cc
99c779
@@ -422,7 +422,7 @@ string dirname(const string & path)
99c779
   path.copy(buffer, len);
99c779
   buffer[len] = '\0';
99c779
   string result = dirname(buffer);
99c779
-  delete buffer;
99c779
+  delete[] buffer;
99c779
   return result;
99c779
 }
99c779
 
99c779
-- 
99c779
2.10.2
99c779