diff options
author | Sabre Shao <[email protected]> | 2016-02-25 05:30:33 -0500 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2017-03-30 14:44:33 +0200 |
commit | eb3036ed46d97d43728626207b423fdc9c09e3d7 (patch) | |
tree | d1a71fe647c8029efd9e23e03a71c52ba86e0caa /src/amd/addrlib/r800/siaddrlib.h | |
parent | 680f91e5d47e6147bac1c214e921bf655a4785a3 (diff) |
amdgpu/addrlib: fix crash on allocation failure
Diffstat (limited to 'src/amd/addrlib/r800/siaddrlib.h')
-rw-r--r-- | src/amd/addrlib/r800/siaddrlib.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/amd/addrlib/r800/siaddrlib.h b/src/amd/addrlib/r800/siaddrlib.h index 80c5cf4079f..86d21167da7 100644 --- a/src/amd/addrlib/r800/siaddrlib.h +++ b/src/amd/addrlib/r800/siaddrlib.h @@ -85,7 +85,8 @@ public: /// Creates SiLib object static Addr::Lib* CreateObj(const Client* pClient) { - return new(pClient) SiLib(pClient); + VOID* pMem = Object::ClientAlloc(sizeof(SiLib), pClient); + return (pMem != NULL) ? new (pMem) SiLib(pClient) : NULL; } protected: |