mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-13 13:01:55 +03:00
fixed valgrind initialisation issue
git-svn-id: svn://svn.code.sf.net/p/axtls/code/trunk@47 9a5d90b5-6617-0410-8a86-bb477d3ed2e3
This commit is contained in:
@ -50,7 +50,7 @@ const char * const unsupported_str = "Error: feature not supported\n";
|
||||
BUF_MEM buf_new()
|
||||
{
|
||||
BUF_MEM bm;
|
||||
bm.pre_data = (uint8_t *)malloc(2048); /* should be enough to start with */
|
||||
bm.pre_data = (uint8_t *)calloc(1, 2048); /* start with this */
|
||||
bm.data = bm.pre_data+BM_RECORD_OFFSET; /* some space at the start */
|
||||
bm.max_len = 2048-BM_RECORD_OFFSET;
|
||||
bm.index = 0;
|
||||
|
Reference in New Issue
Block a user