aboutsummaryrefslogtreecommitdiff
path: root/src/regex/regex.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-12-15 00:00:36 +0000
committerChristian Grothoff <christian@grothoff.org>2012-12-15 00:00:36 +0000
commitcc47c16a08337634a06489491c38a9fa3f46471b (patch)
tree9622a697b13f50af60acbefab672a1147e3beb23 /src/regex/regex.c
parentfcabb1d4ff2773543514795dcd470d24fb832c90 (diff)
downloadgnunet-cc47c16a08337634a06489491c38a9fa3f46471b.tar.gz
gnunet-cc47c16a08337634a06489491c38a9fa3f46471b.zip
-fixing some leaks
Diffstat (limited to 'src/regex/regex.c')
-rw-r--r--src/regex/regex.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/regex/regex.c b/src/regex/regex.c
index 839b425bf..0a2671fa0 100644
--- a/src/regex/regex.c
+++ b/src/regex/regex.c
@@ -3703,18 +3703,20 @@ GNUNET_REGEX_combine (char * const regexes[])
3703 unsigned int i; 3703 unsigned int i;
3704 char *combined; 3704 char *combined;
3705 const char *current; 3705 const char *current;
3706 struct RegexCombineCtx *ctx; 3706 struct RegexCombineCtx ctx;
3707 3707
3708 ctx = GNUNET_malloc (sizeof (struct RegexCombineCtx)); 3708 memset (&ctx, 0, sizeof (struct RegexCombineCtx));
3709 for (i = 0; regexes[i]; i++) 3709 for (i = 0; regexes[i]; i++)
3710 { 3710 {
3711 current = regexes[i]; 3711 current = regexes[i];
3712 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Regex %u: %s\n", i, current); 3712 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Regex %u: %s\n", i, current);
3713 regex_add (ctx, current); 3713 regex_add (&ctx, current);
3714 } 3714 }
3715 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "\nCombining...\n"); 3715 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "\nCombining...\n");
3716 3716
3717 combined = regex_combine (ctx); 3717 combined = regex_combine (&ctx);
3718 3718
3719 return combined; 3719 return combined;
3720} 3720}
3721
3722/* end of regex.c */