diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2018-11-23 14:14:54 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2018-11-23 15:38:00 +0000 |
commit | 1a0733e534dee0dae140e38a789c3ab5008e7844 (patch) | |
tree | 3ef00ada8cdbbb82932447c070005cf1c03a262a /src/daemonizer | |
parent | unit_tests: do not rethrow a copy of an exception (diff) | |
download | monero-1a0733e534dee0dae140e38a789c3ab5008e7844.tar.xz |
windows_service: fix memory leak
Found by codacy.com
Diffstat (limited to 'src/daemonizer')
-rw-r--r-- | src/daemonizer/windows_service.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/daemonizer/windows_service.cpp b/src/daemonizer/windows_service.cpp index b344e1a4b..1302fa578 100644 --- a/src/daemonizer/windows_service.cpp +++ b/src/daemonizer/windows_service.cpp @@ -70,8 +70,9 @@ namespace { } else { - return std::string{p_error_text}; + std::string ret{p_error_text}; LocalFree(p_error_text); + return ret; } } |