Browse Source

Fix memory leaks introduced in previous commit

tags/2.63
Steven Chamberlain 6 years ago
parent
commit
525dcb6a22
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      choose-mirror.c

+ 5
- 0
choose-mirror.c View File

@@ -248,6 +248,7 @@ static int cross_validate_release(struct release_t *release) {

free(t_release.name);
free(t_release.suite);
free(t_release.archs);

return ret;
}
@@ -361,6 +362,8 @@ static int get_release(struct release_t *release, const char *name) {
/* No: disregard this release */
log_invalid_release(name, "Architectures");
release->status &= ~IS_VALID;
free(release->archs);
free(release->name);
release->name = NULL;
}

@@ -468,6 +471,7 @@ static int find_releases(void) {
free(default_suite);
free(release.name);
free(release.suite);
free(release.archs);

debconf_input(debconf, "critical", DEBCONF_BASE "bad");
if (debconf_go(debconf) == 30)
@@ -980,6 +984,7 @@ int main (int argc, char **argv) {
for (i=0; releases[i].name != NULL; i++) {
free(releases[i].name);
free(releases[i].suite);
free(releases[i].archs);
}

return (state >= 0) ? 0 : 10; /* backed all the way out */


Loading…
Cancel
Save