Skip to content

Commit

Permalink
Merge pull request #4895
Browse files Browse the repository at this point in the history
3de7d52 unit_tests: fix malloc/delete mismatch (moneromooo-monero)
  • Loading branch information
fluffypony committed Dec 4, 2018
2 parents 81418cb + 3de7d52 commit 36219fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/unit_tests/notify.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 36219fe

Please sign in to comment.