summaryrefslogtreecommitdiff
path: root/source4/heimdal/lib/asn1/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/heimdal/lib/asn1/main.c')
-rw-r--r--source4/heimdal/lib/asn1/main.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source4/heimdal/lib/asn1/main.c b/source4/heimdal/lib/asn1/main.c
index 115c82a9c7..5cef970d78 100644
--- a/source4/heimdal/lib/asn1/main.c
+++ b/source4/heimdal/lib/asn1/main.c
@@ -142,6 +142,10 @@ main(int argc, char **argv)
}
arg = calloc(2, sizeof(arg[0]));
+ if (arg == NULL) {
+ perror("calloc");
+ exit(1);
+ }
arg[0] = option_file;
arg[1] = NULL;
len = 1;
@@ -150,7 +154,7 @@ main(int argc, char **argv)
buf[strcspn(buf, "\n\r")] = '\0';
arg = realloc(arg, (len + 2) * sizeof(arg[0]));
- if (argv == NULL) {
+ if (arg == NULL) {
perror("malloc");
exit(1);
}