summaryrefslogtreecommitdiff
path: root/tools/permutations.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2018-09-20 13:16:30 -0400
committerGitHub <noreply@github.com>2018-09-20 13:16:30 -0400
commita10f94506a9325b3ee95f98829cb624a023ae7ee (patch)
treee93eddee6b7b72566376b963477627c3a95168d1 /tools/permutations.c
parent5946f386d2efbeee9111b7f1bad7b63aa6a86c4e (diff)
parent3b23c6c379c2b3a2f9fdbf3aec7cb5e0158c498d (diff)
Merge pull request #3058 from pacovn/Coverity_1399484_Dereference_null_return_value
tools: null check (Coverity 1399484)
Diffstat (limited to 'tools/permutations.c')
-rw-r--r--tools/permutations.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/permutations.c b/tools/permutations.c
index c5109dc3e8..f51d4a4ec9 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();