forked from ariadne/pkgconf
libpkgconf: fragment: check pkgconf_argv_split() return value
parent
6e21b142e3
commit
58ffacccc1
|
@ -612,11 +612,17 @@ pkgconf_fragment_free(pkgconf_list_t *list)
|
|||
void
|
||||
pkgconf_fragment_parse(const pkgconf_client_t *client, pkgconf_list_t *list, pkgconf_list_t *vars, const char *value)
|
||||
{
|
||||
int i, argc;
|
||||
int i, ret, argc;
|
||||
char **argv;
|
||||
char *repstr = pkgconf_tuple_parse(client, vars, value);
|
||||
|
||||
pkgconf_argv_split(repstr, &argc, &argv);
|
||||
ret = pkgconf_argv_split(repstr, &argc, &argv);
|
||||
if (ret < 0)
|
||||
{
|
||||
PKGCONF_TRACE(client, "unable to parse fragment string [%s]", repstr);
|
||||
free(repstr);
|
||||
return;
|
||||
}
|
||||
|
||||
for (i = 0; i < argc && argv[i] != NULL; i++)
|
||||
pkgconf_fragment_add(client, list, argv[i]);
|
||||
|
|
Loading…
Reference in New Issue