Hi dear list,

Here a little memory leak fix proposal.

Kind regards.
Thanks.
Index: src/extra/tre/regexec.c
===================================================================
--- src/extra/tre/regexec.c	(revision 75507)
+++ src/extra/tre/regexec.c	(working copy)
@@ -163,9 +163,12 @@
 	{
 	  const tre_str_source *source = string;
 	  if (source->rewind == NULL || source->compare == NULL)
-	    /* The backtracking matcher requires rewind and compare
-	       capabilities from the input stream. */
-	    return REG_BADPAT;
+            {
+              free(tags);
+	      /* The backtracking matcher requires rewind and compare
+	         capabilities from the input stream. */
+	       return REG_BADPAT;
+            }
 	}
       status = tre_tnfa_run_backtrack(tnfa, string, (int)len, type,
 				      tags, eflags, &eo);
______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to