1
1
Форкнуть 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)
Этот коммит содержится в:
Jakub Jelen 2022-08-11 17:03:26 +02:00
родитель 8c40b2491d
Коммит 5944124428
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -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;