bin: no point in cleaning up resources when it's exiting...

This commit is contained in:
Juan RP
2012-12-14 11:58:30 +01:00
parent 647aa0727f
commit e2176ec4b6
16 changed files with 65 additions and 224 deletions

View File

@@ -119,12 +119,9 @@ remove_obsoletes(struct xbps_handle *xhp, const char *repodir)
if (errno != ENOENT) {
fprintf(stderr, "xbps-rindex: cannot read `%s': %s\n",
plist, strerror(errno));
free(plist);
return -1;
} else {
free(plist);
} else
return 0;
}
}
/* initialize repository index */
ri.repod = idx;
@@ -134,13 +131,11 @@ remove_obsoletes(struct xbps_handle *xhp, const char *repodir)
if (chdir(repodir) == -1) {
fprintf(stderr, "xbps-rindex: cannot chdir to %s: %s\n",
repodir, strerror(errno));
prop_object_release(idx);
return errno;
}
if ((dirp = opendir(repodir)) == NULL) {
fprintf(stderr, "xbps-rindex: failed to open %s: %s\n",
repodir, strerror(errno));
prop_object_release(idx);
return errno;
}
while ((dp = readdir(dirp))) {
@@ -180,9 +175,5 @@ remove_obsoletes(struct xbps_handle *xhp, const char *repodir)
for (i = 0; i < maxthreads; i++)
pthread_join(thd[i].thread, NULL);
free(thd);
prop_object_release(array);
prop_object_release(idx);
return rv;
}