Fix a long standing bug in the output buffer size computation.
git cherry-pick -e 2a7f2ae7d4
This commit is contained in:
parent
4553b08d75
commit
0c0f68e8ff
1 changed files with 1 additions and 1 deletions
|
@ -454,7 +454,7 @@ static void showLog(LogState *state,
|
|||
|
||||
numVecs = numLines*3; // 3 iovecs per line.
|
||||
if (numVecs > INLINE_VECS) {
|
||||
vec = (struct iovec*)malloc(sizeof(struct iovec)*numLines);
|
||||
vec = (struct iovec*)malloc(sizeof(struct iovec)*numVecs);
|
||||
if (vec == NULL) {
|
||||
msg = "LOG: write failed, no memory";
|
||||
numVecs = 3;
|
||||
|
|
Loading…
Reference in a new issue