diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2018-11-23 15:55:14 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2018-11-23 15:55:41 +0000 |
commit | 3de7d52f7cdbf8cab4f9b4b1acd99dd989819917 (patch) | |
tree | 86d499b20af5e61ce30d6c37d29991de6ad7df9a /tests/unit_tests | |
parent | Merge pull request #4781 (diff) | |
download | monero-3de7d52f7cdbf8cab4f9b4b1acd99dd989819917.tar.xz |
unit_tests: fix malloc/delete mismatch
Diffstat (limited to 'tests/unit_tests')
-rw-r--r-- | tests/unit_tests/notify.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/unit_tests/notify.cpp b/tests/unit_tests/notify.cpp index edc4eabdf..105d21ca8 100644 --- a/tests/unit_tests/notify.cpp +++ b/tests/unit_tests/notify.cpp @@ -49,7 +49,7 @@ TEST(notify, works) tmp = "/tmp"; static const char *filename = "monero-notify-unit-test-XXXXXX"; const size_t len = strlen(tmp) + 1 + strlen(filename); - std::unique_ptr<char[]> name_template_((char*)malloc(len + 1)); + std::unique_ptr<char[]> name_template_(new char[len + 1]); char *name_template = name_template_.get(); ASSERT_TRUE(name_template != NULL); snprintf(name_template, len + 1, "%s/%s", tmp, filename); |