diff options
author | Pankaj <pankaj.s01@samsung.com> | 2016-09-20 18:05:05 +0200 |
---|---|---|
committer | Daiki Ueno <ueno@gnu.org> | 2016-12-13 10:13:41 +0100 |
commit | 2cf22900bbcb3a0f3d11b56ad262bef33e997a00 (patch) | |
tree | a063e8d04575dab4a5d625c841719bf2bb7eb179 /common | |
parent | 694c95d8da89e2f6aae47c7c379b3c0e2b9adbe8 (diff) |
mock: Check return value of calloc()
https://bugs.freedesktop.org/show_bug.cgi?id=92813
Diffstat (limited to 'common')
-rw-r--r-- | common/mock.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/common/mock.c b/common/mock.c index c3f2503..8bd617d 100644 --- a/common/mock.c +++ b/common/mock.c @@ -919,6 +919,7 @@ mock_C_OpenSession (CK_SLOT_ID slot_id, return CKR_SESSION_PARALLEL_NOT_SUPPORTED; sess = calloc (1, sizeof (Session)); + return_val_if_fail (sess != NULL, CKR_HOST_MEMORY); sess->handle = ++unique_identifier; sess->info.flags = flags; sess->info.slotID = slot_id; |