aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJason Woodward2005-01-13 21:41:22 +0000
committerJason Woodward2005-01-13 21:41:22 +0000
commit46d07c3ee2b82b65cf579631204bd7bb1e1d9985 (patch)
tree23cdde267cde05a76a941d336a7adb39e72bc148 /src
parent1d47501a32725c2222b078d4a26d2b4a475493ab (diff)
downloadslapt-get-46d07c3ee2b82b65cf579631204bd7bb1e1d9985.tar.gz
added missing free_regex() calls in parse_meta_entry()
Diffstat (limited to 'src')
-rw-r--r--src/package.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/package.c b/src/package.c
index 56b8bb0..ffb2bea 100644
--- a/src/package.c
+++ b/src/package.c
@@ -1242,6 +1242,7 @@ static pkg_info_t *parse_meta_entry(struct pkg_list *avail_pkgs,struct pkg_list
#if DEBUG == 1
printf("regex %s failed on %s\n",REQUIRED_REGEX,dep_entry);
#endif
+ free_regex(&parse_dep_regex);
return NULL;
}
@@ -1266,8 +1267,14 @@ static pkg_info_t *parse_meta_entry(struct pkg_list *avail_pkgs,struct pkg_list
#if DEBUG == 1
printf("no conditional\n");
#endif
- if( newest_avail_pkg != NULL ) return newest_avail_pkg;
- if( newest_installed_pkg != NULL ) return newest_installed_pkg;
+ if( newest_avail_pkg != NULL ){
+ free_regex(&parse_dep_regex);
+ return newest_avail_pkg;
+ }
+ if( newest_installed_pkg != NULL ){
+ free_regex(&parse_dep_regex);
+ return newest_installed_pkg;
+ }
}
if( (parse_dep_regex.pmatch[2].rm_eo - parse_dep_regex.pmatch[2].rm_so) > 3 ){