There was an error while loading. Please reload this page.
1 parent 85a4480 commit 1bd0c0dCopy full SHA for 1bd0c0d
1 file changed
src/strings.c
@@ -2310,9 +2310,9 @@ expand_regex(char ***substr)
2310
const size_t l = strlen(t) + 3;
2311
char *rstr = xnmalloc(l, sizeof(char));
2312
snprintf(rstr, l, "^%s$", t);
2313
- free(dstr);
2314
2315
- const int ret = check_regex(rstr);
+ const int ret = check_regex(dstr);
+ free(dstr);
2316
2317
if (ret != FUNC_SUCCESS
2318
|| regcomp(®ex, rstr, reg_flags) != FUNC_SUCCESS) {
0 commit comments