diff options
author | Pankaj <pankaj.s01@samsung.com> | 2015-10-20 11:05:00 +0000 |
---|---|---|
committer | Stef Walter <stefw@redhat.com> | 2015-10-20 17:41:47 +0200 |
commit | 98dbc98709bb9a5fe1d6e7beea585c39073e528c (patch) | |
tree | 7299013268dbb728596921fca925bd179cdd6ad4 /p11-kit/modules.c | |
parent | 29014eab3caf4f70fcd94c8198ca24992b1e5ec6 (diff) | |
download | p11-kit-98dbc98709bb9a5fe1d6e7beea585c39073e528c.tar.gz |
p11-kit: Fix warnings related to use dangling pointer
https://bugs.freedesktop.org/show_bug.cgi?id=92551
Diffstat (limited to 'p11-kit/modules.c')
-rw-r--r-- | p11-kit/modules.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/p11-kit/modules.c b/p11-kit/modules.c index bbeeef6..fac4707 100644 --- a/p11-kit/modules.c +++ b/p11-kit/modules.c @@ -1689,9 +1689,13 @@ managed_C_CloseAllSessions (CK_X_FUNCTION_LIST *self, self = &managed->mod->virt.funcs; managed_close_sessions (self, stolen, count); - free (stolen); + if (stolen) { + free (stolen); + return CKR_OK; + } else { + return CKR_GENERAL_ERROR; + } - return stolen ? CKR_OK : CKR_GENERAL_ERROR; } static void |