diff options
author | Vicent Marti <tanoku@gmail.com> | 2016-05-24 15:50:44 +0200 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2016-06-06 15:39:05 -0700 |
commit | 42b07cc9c8d2e6251d190e5ea0d13fd66cb51e6d (patch) | |
tree | 493ffc6b16278c54da28645d96a9359717625576 /src/main.c | |
parent | 0eafc0af940646ab581e47e63090c1692a3525aa (diff) |
cmake: Global handler for OOM situations
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -3,6 +3,7 @@ #include <string.h> #include <errno.h> #include "config.h" +#include "memory.h" #include "cmark.h" #if defined(_WIN32) && !defined(__CYGWIN__) @@ -80,7 +81,7 @@ int main(int argc, char *argv[]) { _setmode(_fileno(stdout), _O_BINARY); #endif - files = (int *)malloc(argc * sizeof(*files)); + files = (int *)cmark_calloc(argc, sizeof(*files)); for (i = 1; i < argc; i++) { if (strcmp(argv[i], "--version") == 0) { |