X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=zpm-search.c;h=b431152e690fe8ec451ed488290ad7a93cd2afe0;hb=40b7ccdf7347ae34cbaa52faadaa95ac6fe11457;hp=290c0834c63dc76212beaeea680faf799d02f5ad;hpb=c42bb61b39cceab59c17d352f2593f3a5239a27d;p=zpackage 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);