From cc47c16a08337634a06489491c38a9fa3f46471b Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 15 Dec 2012 00:00:36 +0000 Subject: -fixing some leaks --- src/regex/regex.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/regex/regex.c') 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[]) unsigned int i; char *combined; const char *current; - struct RegexCombineCtx *ctx; + struct RegexCombineCtx ctx; - ctx = GNUNET_malloc (sizeof (struct RegexCombineCtx)); + memset (&ctx, 0, sizeof (struct RegexCombineCtx)); for (i = 0; regexes[i]; i++) { current = regexes[i]; GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Regex %u: %s\n", i, current); - regex_add (ctx, current); + regex_add (&ctx, current); } GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "\nCombining...\n"); - combined = regex_combine (ctx); + combined = regex_combine (&ctx); return combined; } + +/* end of regex.c */ -- cgit v1.2.3