mirror of
https://github.com/gnif/LookingGlass.git
synced 2026-06-02 12:54:26 +00:00
[client/common] fixes for issues detected through static analysis.
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
|
||||
#include "common/stringlist.h"
|
||||
#include "common/vector.h"
|
||||
#include "common/debug.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
@@ -32,6 +33,12 @@ struct StringList
|
||||
StringList stringlist_new(bool owns_strings)
|
||||
{
|
||||
StringList sl = malloc(sizeof(*sl));
|
||||
if (!sl)
|
||||
{
|
||||
DEBUG_ERROR("out of memory");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
sl->owns_strings = owns_strings;
|
||||
|
||||
if (!vector_create(&sl->vector, sizeof(char *), 32))
|
||||
|
||||
Reference in New Issue
Block a user