1
1
Fork 0

examples: Fix dereference after NULL check (CID 1461477)

Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
(cherry picked from commit 8164e1ff9c)
This commit is contained in:
Jakub Jelen 2022-08-11 17:03:26 +02:00
parent 8c40b2491d
commit 5944124428
1 changed files with 1 additions and 1 deletions

View File

@ -92,7 +92,7 @@ cleanup_push(struct cleanup_node_struct** head_ref,
// Allocate memory for node
struct cleanup_node_struct *new_node = malloc(sizeof *new_node);
if (head_ref != NULL) {
if (*head_ref != NULL) {
new_node->next = *head_ref;
} else {
new_node->next = NULL;