mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Fix memory leak: Missing regfree() after regcomp().
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22070 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
4d871fc9fd
commit
af0709b732
@ -928,6 +928,7 @@ gnc_xml_be_remove_old_files(FileBackend *be)
|
||||
else if (regexec(&pattern, stamp_start, 0, NULL, 0) == 0)
|
||||
got_date_stamp = TRUE;
|
||||
|
||||
regfree(&pattern);
|
||||
g_free(expression);
|
||||
|
||||
if (!got_date_stamp) /* Not a gnucash created file after all... */
|
||||
|
@ -179,6 +179,7 @@ extract_machine_name( const gchar* path )
|
||||
machine = g_strndup( path + match[1].rm_so, match[1].rm_eo - match[1].rm_so );
|
||||
}
|
||||
}
|
||||
regfree(&compiled_m);
|
||||
return machine;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user