]> git.sur5r.net Git - i3/i3/blobdiff - src/regex.c
Merge pull request #1816 from tcreech/tcreech-for-illumos
[i3/i3] / src / regex.c
index 9549a98b54ba36980fe956b8957e63d4e21f1c6b..913519bede31d826144bdb7e5272e9c92598d876 100644 (file)
@@ -25,7 +25,7 @@ struct regex *regex_new(const char *pattern) {
     const char *error;
     int errorcode, offset;
 
-    struct regex *re = scalloc(sizeof(struct regex));
+    struct regex *re = scalloc(1, sizeof(struct regex));
     re->pattern = sstrdup(pattern);
     int options = PCRE_UTF8;
 #ifdef PCRE_HAS_UCP