From bda1bc5b5b99b89ade96a9dc510fe60c2f720c82 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 18 Mar 2009 18:05:17 +1100 Subject: [PATCH] s3:lib Use push_ucs2_talloc() in ms_fnmatch() --- source3/lib/ms_fnmatch.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/source3/lib/ms_fnmatch.c b/source3/lib/ms_fnmatch.c index ca534467fa7..9e6b7769848 100644 --- a/source3/lib/ms_fnmatch.c +++ b/source3/lib/ms_fnmatch.c @@ -170,12 +170,12 @@ int ms_fnmatch(const char *pattern, const char *string, bool translate_pattern, } } - if (!push_ucs2_allocate(&p, pattern, &converted_size)) { + if (!push_ucs2_talloc(NULL, &p, pattern, &converted_size)) { return -1; } - if (!push_ucs2_allocate(&s, string, &converted_size)) { - SAFE_FREE(p); + if (!push_ucs2_talloc(NULL, &s, string, &converted_size)) { + TALLOC_FREE(p); return -1; } @@ -225,8 +225,8 @@ int ms_fnmatch(const char *pattern, const char *string, bool translate_pattern, ret = ms_fnmatch_core(p, s, max_n, strrchr_w(s, UCS2_CHAR('.')), is_case_sensitive); SAFE_FREE(max_n_free); - SAFE_FREE(p); - SAFE_FREE(s); + TALLOC_FREE(p); + TALLOC_FREE(s); return ret; } -- 2.34.1