mirror of
https://github.com/monero-project/monero.git
synced 2024-10-01 11:49:47 -04:00
Merge pull request #4895
3de7d52f
unit_tests: fix malloc/delete mismatch (moneromooo-monero)
This commit is contained in:
commit
36219feff1
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user