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 8164e1ff9cba2888e0cdbe46093ed272fd682344)
Этот коммит содержится в:
родитель
8c40b2491d
Коммит
5944124428
@ -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;
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user