avoid invalid read
This commit is contained in:
parent
b54198ba4a
commit
3fd6770c81
|
@ -25,6 +25,7 @@ typedef struct {
|
||||||
|
|
||||||
SStreamTask* pTask;
|
SStreamTask* pTask;
|
||||||
int64_t dbRefId;
|
int64_t dbRefId;
|
||||||
|
void* pMeta;
|
||||||
} SAsyncUploadArg;
|
} SAsyncUploadArg;
|
||||||
|
|
||||||
static int32_t downloadCheckpointDataByName(const char* id, const char* fname, const char* dstName);
|
static int32_t downloadCheckpointDataByName(const char* id, const char* fname, const char* dstName);
|
||||||
|
@ -437,7 +438,7 @@ int32_t uploadCheckpointData(void* param) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((code = taskDbGenChkpUploadData(arg->pTask->pBackend, arg->pTask->pMeta->bkdChkptMgt, arg->chkpId,
|
if ((code = taskDbGenChkpUploadData(arg->pTask->pBackend, ((SStreamMeta*)arg->pMeta)->bkdChkptMgt, arg->chkpId,
|
||||||
(int8_t)(arg->type), &path, toDelFiles)) != 0) {
|
(int8_t)(arg->type), &path, toDelFiles)) != 0) {
|
||||||
stError("s-task:%s failed to gen upload checkpoint:%" PRId64 "", taskStr, arg->chkpId);
|
stError("s-task:%s failed to gen upload checkpoint:%" PRId64 "", taskStr, arg->chkpId);
|
||||||
}
|
}
|
||||||
|
@ -489,6 +490,7 @@ int32_t streamTaskRemoteBackupCheckpoint(SStreamTask* pTask, int64_t chkpId, cha
|
||||||
arg->chkpId = chkpId;
|
arg->chkpId = chkpId;
|
||||||
arg->pTask = pTask;
|
arg->pTask = pTask;
|
||||||
arg->dbRefId = taskGetDBRef(pTask->pBackend);
|
arg->dbRefId = taskGetDBRef(pTask->pBackend);
|
||||||
|
arg->pMeta = pTask->pMeta;
|
||||||
|
|
||||||
return streamMetaAsyncExec(pTask->pMeta, uploadCheckpointData, arg, NULL);
|
return streamMetaAsyncExec(pTask->pMeta, uploadCheckpointData, arg, NULL);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue