summaryrefslogtreecommitdiffstats
path: root/libopkg/xregex.c
diff options
context:
space:
mode:
Diffstat (limited to 'libopkg/xregex.c')
-rw-r--r--libopkg/xregex.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libopkg/xregex.c b/libopkg/xregex.c
index 0ae54e7..b0cd8b9 100644
--- a/libopkg/xregex.c
+++ b/libopkg/xregex.c
@@ -39,7 +39,7 @@ static void print_regcomp_err(const regex_t *preg, int err)
fprintf(stderr, "%s: Error compiling regex:", __FUNCTION__);
size = regerror(err, preg, 0, 0);
- error = malloc(size);
+ error = calloc(1, size);
if (error) {
regerror(err, preg, error, size);
fprintf(stderr, "%s\n", error);