Skip to content

Commit

Permalink
isisd: resolve possible null pointer dereference
Browse files Browse the repository at this point in the history
issue found by cppcheck

[isisd/dict.c:1320] -> [isisd/dict.c:1065]:
(warning) Either the condition '!dn' is redundant or
there is possible null pointer dereference: newnode.

[isisd/dict.c:1320] -> [isisd/dict.c:1068]:
(warning) Either the condition '!dn' is redundant or
there is possible null pointer dereference: newnode.

Signed-off-by: Ilya Shipitsin <chipitsine@gmail.com>
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
  • Loading branch information
chipitsine authored and donaldsharp committed Apr 23, 2018
1 parent ff1821a commit 4241b8e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions isisd/dict.c
Expand Up @@ -1323,9 +1323,8 @@ static void construct(dict_t *d)
free(val);
if (dn)
dnode_destroy(dn);
}

dict_load_next(&dl, dn, key);
} else
dict_load_next(&dl, dn, key);
break;
default:
putchar('?');
Expand Down

0 comments on commit 4241b8e

Please sign in to comment.