diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2018-09-20 19:16:30 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-20 19:16:30 +0200 |
commit | a10f94506a9325b3ee95f98829cb624a023ae7ee (patch) | |
tree | e93eddee6b7b72566376b963477627c3a95168d1 /tools | |
parent | Merge pull request #3062 from pacovn/static_analysis__redundant_parentheses (diff) | |
parent | tools: null check (Coverity 1399484) (diff) | |
download | frr-a10f94506a9325b3ee95f98829cb624a023ae7ee.tar.xz frr-a10f94506a9325b3ee95f98829cb624a023ae7ee.zip |
Merge pull request #3058 from pacovn/Coverity_1399484_Dereference_null_return_value
tools: null check (Coverity 1399484)
Diffstat (limited to 'tools')
-rw-r--r-- | tools/permutations.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/permutations.c b/tools/permutations.c index c5109dc3e..f51d4a4ec 100644 --- a/tools/permutations.c +++ b/tools/permutations.c @@ -39,7 +39,8 @@ int main(int argc, char *argv[]) fprintf(stdout, USAGE "\n"); exit(EXIT_SUCCESS); } - struct cmd_element *cmd = calloc(1, sizeof(struct cmd_element)); + struct cmd_element *cmd = XCALLOC(MTYPE_TMP, + sizeof(struct cmd_element)); cmd->string = strdup(argv[1]); struct graph *graph = graph_new(); |