forked from ariadne/pkgconf
pkg: plug some minor memory leaks
parent
77703f1841
commit
656b34fb45
6
pkg.c
6
pkg.c
|
@ -76,9 +76,15 @@ pkg_find(const char *name)
|
|||
while (iter < count)
|
||||
{
|
||||
snprintf(locbuf, sizeof locbuf, "%s/%s" PKG_CONFIG_EXT, path[iter], name);
|
||||
free(path[iter]);
|
||||
|
||||
if (f = fopen(locbuf, "r"))
|
||||
return parse_file(locbuf, f);
|
||||
|
||||
iter++;
|
||||
}
|
||||
|
||||
free(path);
|
||||
}
|
||||
|
||||
snprintf(locbuf, sizeof locbuf, "%s/%s" PKG_CONFIG_EXT, PKG_DEFAULT_PATH, name);
|
||||
|
|
Loading…
Reference in New Issue