Permalink
Browse files

Merge pull request #4895

3de7d52 unit_tests: fix malloc/delete mismatch (moneromooo-monero)
  • Loading branch information...
fluffypony committed Dec 4, 2018
2 parents 81418cb + 3de7d52 commit 36219feff1c67945fcb501af2ef5a2bce58e4b9d
Showing with 1 addition and 1 deletion.
  1. +1 −1 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);

0 comments on commit 36219fe

Please sign in to comment.