fix: add return value check
This commit is contained in:
parent
2a1e14ef24
commit
c647372f94
|
@ -3318,7 +3318,7 @@ static int32_t tColDataMerge(SArray **colArr) {
|
||||||
|
|
||||||
SColData *dstCol = taosArrayReserve(dst, 1);
|
SColData *dstCol = taosArrayReserve(dst, 1);
|
||||||
if (dstCol == NULL) {
|
if (dstCol == NULL) {
|
||||||
code = TSDB_CODE_OUT_OF_MEMORY;
|
code = terrno;
|
||||||
goto _exit;
|
goto _exit;
|
||||||
}
|
}
|
||||||
tColDataInit(dstCol, srcCol->cid, srcCol->type, srcCol->cflag);
|
tColDataInit(dstCol, srcCol->cid, srcCol->type, srcCol->cflag);
|
||||||
|
@ -3337,7 +3337,10 @@ static int32_t tColDataMerge(SArray **colArr) {
|
||||||
|
|
||||||
SColVal cv;
|
SColVal cv;
|
||||||
tColDataGetValue(srcCol, i, &cv);
|
tColDataGetValue(srcCol, i, &cv);
|
||||||
tColDataAppendValue(dstCol, &cv);
|
code = tColDataAppendValue(dstCol, &cv);
|
||||||
|
if (code) {
|
||||||
|
goto _exit;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
lastKey = key;
|
lastKey = key;
|
||||||
} else { // update existing row
|
} else { // update existing row
|
||||||
|
@ -3347,7 +3350,10 @@ static int32_t tColDataMerge(SArray **colArr) {
|
||||||
|
|
||||||
SColVal cv;
|
SColVal cv;
|
||||||
tColDataGetValue(srcCol, i, &cv);
|
tColDataGetValue(srcCol, i, &cv);
|
||||||
tColDataUpdateValue(dstCol, &cv, true);
|
code = tColDataUpdateValue(dstCol, &cv, true);
|
||||||
|
if (code) {
|
||||||
|
goto _exit;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue