`pool` is not checked for NULL after its allocation. Error out
if the allocation fails.
In lttng_unlinked_file_pool_create: Return value of function which
returns null is dereferenced without checking (CWE-476)
Reported-by: Coverity Scan
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: I2a7717701cf3d11de557b9ecdc6609c1f6a1fd6f
{
struct lttng_unlinked_file_pool *pool = zmalloc(sizeof(*pool));
+ if (!pool) {
+ goto error;
+ }
+
if (!path || *path != '/') {
ERR("Unlinked file pool must be created with an absolute path, path = \"%s\"",
path ? path : "NULL");