530.30.02

This commit is contained in:
Andy Ritger
2023-02-28 11:12:44 -08:00
parent e598191e8e
commit 4397463e73
928 changed files with 124728 additions and 88525 deletions

View File

@@ -90,13 +90,16 @@ NV_STATUS __nvoc_objCreate_Object(Object **ppThis, Dynamic *pParent, NvU32 creat
Object *pParentObj;
Object *pThis;
pThis = portMemAllocNonPaged(sizeof(Object));
if (pThis == NULL) return NV_ERR_NO_MEMORY;
status = __nvoc_handleObjCreateMemAlloc(createFlags, sizeof(Object), (void**)&pThis, (void**)ppThis);
if (status != NV_OK)
return status;
portMemSet(pThis, 0, sizeof(Object));
__nvoc_initRtti(staticCast(pThis, Dynamic), &__nvoc_class_def_Object);
pThis->createFlags = createFlags;
if (pParent != NULL && !(createFlags & NVOC_OBJ_CREATE_FLAGS_PARENT_HALSPEC_ONLY))
{
pParentObj = dynamicCast(pParent, Object);
@@ -112,11 +115,17 @@ NV_STATUS __nvoc_objCreate_Object(Object **ppThis, Dynamic *pParent, NvU32 creat
if (status != NV_OK) goto __nvoc_objCreate_Object_cleanup;
*ppThis = pThis;
return NV_OK;
__nvoc_objCreate_Object_cleanup:
// do not call destructors here since the constructor already called them
portMemFree(pThis);
if (createFlags & NVOC_OBJ_CREATE_FLAGS_IN_PLACE_CONSTRUCT)
portMemSet(pThis, 0, sizeof(Object));
else
portMemFree(pThis);
// coverity[leaked_storage:FALSE]
return status;
}