fix: check the result of array init
This commit is contained in:
parent
adfa742ac6
commit
3fb4dbbec4
|
@ -1168,6 +1168,10 @@ void cleanupExpiredUdfs() {
|
||||||
|
|
||||||
void cleanupNotExpiredUdfs() {
|
void cleanupNotExpiredUdfs() {
|
||||||
SArray *udfStubs = taosArrayInit(16, sizeof(SUdfcFuncStub));
|
SArray *udfStubs = taosArrayInit(16, sizeof(SUdfcFuncStub));
|
||||||
|
if (udfStubs == NULL) {
|
||||||
|
fnError("cleanupNotExpiredUdfs: failed to init array");
|
||||||
|
return;
|
||||||
|
}
|
||||||
int32_t i = 0;
|
int32_t i = 0;
|
||||||
while (i < taosArrayGetSize(gUdfcProxy.udfStubs)) {
|
while (i < taosArrayGetSize(gUdfcProxy.udfStubs)) {
|
||||||
SUdfcFuncStub *stub = taosArrayGet(gUdfcProxy.udfStubs, i);
|
SUdfcFuncStub *stub = taosArrayGet(gUdfcProxy.udfStubs, i);
|
||||||
|
|
Loading…
Reference in New Issue