gplugin/gplugin

Clean up the early exit for gplugin_version_parser.
feature/find-newest-plugin
2020-04-18, Gary Kramlich
340ac4280635
Parents ac386374379f
Children cf0e98444d64
Clean up the early exit for gplugin_version_parser.
--- a/gplugin/gplugin-version.c Thu Apr 16 20:22:43 2020 -0500
+++ b/gplugin/gplugin-version.c Sat Apr 18 02:46:24 2020 -0500
@@ -111,7 +111,12 @@
matches = g_regex_match(regex, version, 0, &info);
if(!matches) {
- /* if we failed to match the regex, just return our failed values */
+ /* If we failed to match the regex, free info and return our failed
+ * values.
+ */
+ g_match_info_unref(info);
+
+ return;
}
/* grab the major version */