1
0
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:
cameronrich
2006-12-02 03:26:43 +00:00
parent 3d2f9ac3fd
commit e146dbca4f
3 changed files with 90 additions and 89 deletions

View File

@ -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;