summaryrefslogtreecommitdiff
path: root/tools/extract.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/extract.c')
-rw-r--r--tools/extract.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/extract.c b/tools/extract.c
index abbb300..40a3911 100644
--- a/tools/extract.c
+++ b/tools/extract.c
@@ -238,6 +238,9 @@ limit_modules_if_necessary (CK_FUNCTION_LIST_PTR *modules,
/* Count the number of modules */
for (out = 0; modules[out] != NULL; out++);
+ if (out == 0)
+ return;
+
order = malloc (sizeof (*order) * out);
return_if_fail (order != NULL);