From 6ac7fc9c659939bda304c137934b7055df1a7f43 Mon Sep 17 00:00:00 2001 From: Jon Siwek Date: Wed, 24 Feb 2021 15:11:24 -0800 Subject: [PATCH] Avoid superfluous string copies when adding to zeek::detail::sig_files Coverity 1387015 --- src/scan.l | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scan.l b/src/scan.l index 198843fe83..5052e7583c 100644 --- a/src/scan.l +++ b/src/scan.l @@ -357,7 +357,7 @@ when return TOK_WHEN; zeek::reporter->Error("failed to find file associated with @load-sigs %s", file); else - zeek::detail::sig_files.push_back(zeek::util::copy_string(path.c_str())); + zeek::detail::sig_files.push_back(std::move(path)); break; case 0: