Bug#783548: choose-mirror: lists releases that don't include this arch
Hi,
Cyril Brulebois wrote:
> Steven Chamberlain <steven@pyro.eu.org> (2015-04-27):
> > + if (strncmp(line, "Architectures:", 14) == 0)
> > + release->archs = strdup(buf);
>
> I think you're missing some free() matching this strdup().
Thanks, yes. Actually several, fixed now in jessie-kfreebsd branch.
I've confirmed in Valgrind many more leaks, and at least one error
path that will still leak a whole t_release item. I think I can say
it's no worse now than when I touched it, and I've learned a few things
in the process.
I should point out, the strstr() match doesn't consider word boundaries,
so "mips" will match on "mipsel" for example, which could someday result
in false negatives (and thus display a suite by accident) but not false
positives. I don't feel like re-implementing regex matching inside this
C function at this time.
Regards,
--
Steven Chamberlain
steven@pyro.eu.org
Reply to: