examples: Fix dereference after NULL check (CID 1461477)
Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
parent
af85ee8e59
commit
8164e1ff9c
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user