summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2018-09-20 19:16:30 +0200
committerGitHub <noreply@github.com>2018-09-20 19:16:30 +0200
commita10f94506a9325b3ee95f98829cb624a023ae7ee (patch)
treee93eddee6b7b72566376b963477627c3a95168d1 /tools
parentMerge pull request #3062 from pacovn/static_analysis__redundant_parentheses (diff)
parenttools: null check (Coverity 1399484) (diff)
downloadfrr-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.c3
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();