diff options
author | Riccardo Spagni <ric@spagni.net> | 2018-12-04 17:33:31 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2018-12-04 17:33:31 +0200 |
commit | 36219feff1c67945fcb501af2ef5a2bce58e4b9d (patch) | |
tree | a2b0dc1cc439a3297ee13890d1cd0dc9ddb9aaf6 /tests | |
parent | Merge pull request #4894 (diff) | |
parent | unit_tests: fix malloc/delete mismatch (diff) | |
download | monero-36219feff1c67945fcb501af2ef5a2bce58e4b9d.tar.xz |
Merge pull request #4895
3de7d52f unit_tests: fix malloc/delete mismatch (moneromooo-monero)
Diffstat (limited to '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); |