From 4b32c2a03023654be4583883ef3fcab9f2e96d40 Mon Sep 17 00:00:00 2001 From: Andrew Vagin Date: Mon, 12 Oct 2015 16:31:55 +0300 Subject: [PATCH] process: typo fix CID 131308 (#1 of 1): Dereference before null check (REVERSE_INULL) check_after_deref: Null-checking p suggests that it may be null, but it has already been dereferenced on all paths leading to the check. --- src/process.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/process.c b/src/process.c index 1dc5303..54cc3b9 100644 --- a/src/process.c +++ b/src/process.c @@ -101,7 +101,7 @@ static int local_desc_set_env(ct_process_desc_t h, char **env, int n) return -LCTERR_INVARG; p->env = xzalloc(n * sizeof(char *)); - if (p == NULL) + if (p->env == NULL) return -1; p->envn = n;