X-Git-Url: https://pd.if.org/git/?p=zpackage;a=blobdiff_plain;f=zpm-search.c;h=b431152e690fe8ec451ed488290ad7a93cd2afe0;hp=290c0834c63dc76212beaeea680faf799d02f5ad;hb=339988d64465820bfce614d4939cdf6a03cd3c51;hpb=b05cc6682e2cba965f2cabc98cccdd79d008f31b diff --git a/zpm-search.c b/zpm-search.c index 290c083..b431152 100644 --- a/zpm-search.c +++ b/zpm-search.c @@ -134,7 +134,6 @@ int find_globs(struct search_ctl *opt) { default: break; } - globopts = GLOB_APPEND; free(globstr); } @@ -191,7 +190,7 @@ int find_lib(char *soname, struct search_ctl *opt, struct pkgloc *pkg) { struct pkgloc *find_package(char *pkgstr, struct search_ctl *opt) { char *latest = 0; char *installed = 0, *found = 0; - char *pkgfile; + char *pkgfile = 0; struct pkgloc *pkg = 0; int rv; unsigned int i; @@ -345,12 +344,10 @@ void checklibs(struct search_ctl *opts, } /* shouldn't be in there already */ jsw_hinsert(forlibs, pkginfo.id, pkginfo.file); - } - /* otherwise found == 2, so just continue */ - if (found) { free(pkginfo.file); free(pkginfo.id); - } + } + /* otherwise found == 2, so just continue */ } } free(pkgid);