mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-10-15 11:58:12 +00:00
[client/common] fixes for issues detected through static analysis.
This commit is contained in:
@@ -120,7 +120,7 @@ bool ivshmemOpenDev(struct IVSHMEM * dev, const char * shmDevice)
|
||||
DEBUG_ASSERT(dev);
|
||||
|
||||
unsigned int devSize;
|
||||
int devFd = -1;
|
||||
int devFd;
|
||||
bool hasDMA;
|
||||
|
||||
dev->opaque = NULL;
|
||||
|
@@ -44,6 +44,12 @@ static void * threadWrapper(void * opaque)
|
||||
bool lgCreateThread(const char * name, LGThreadFunction function, void * opaque, LGThread ** handle)
|
||||
{
|
||||
*handle = malloc(sizeof(**handle));
|
||||
if (!*handle)
|
||||
{
|
||||
DEBUG_ERROR("out of memory");
|
||||
return false;
|
||||
}
|
||||
|
||||
(*handle)->name = name;
|
||||
(*handle)->function = function;
|
||||
(*handle)->opaque = opaque;
|
||||
|
Reference in New Issue
Block a user