diff options
Diffstat (limited to 'sample/listcap.c')
-rw-r--r-- | sample/listcap.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sample/listcap.c b/sample/listcap.c index e0fe23a..a73f7d4 100644 --- a/sample/listcap.c +++ b/sample/listcap.c @@ -69,6 +69,8 @@ extern int ex(unsigned char* str, unsigned char* pattern, else { /* error */ char s[ONIG_MAX_ERROR_MESSAGE_LEN]; onig_error_code_to_str((UChar* )s, r); + onig_region_free(region, 1 /* 1:free self, 0:free contents only */); + onig_free(reg); return -1; } |