[Babel-users] babeld: memory leak?

Juliusz Chroboczek jch at pps.jussieu.fr
Fri Jul 15 12:22:15 UTC 2011


> we catch them, but if we reach line 70, we really lost the
> network_conf, I think, no?

Actually, this line cannot be reached with conf != NULL.  I'll add an
assertion to document that.

(The reason for that is that if there are multiple interface lines with
the same name, they are merged by merge_nconf, so add_network is called
at most twice for a given interface -- once in config.c, with a non-NULL
conf, and once from babeld.c, when parsing the command line, with conf
being NULL.)

> NB: tests of lines 63, 64 are never usefull… why having create it ?

Defensive coding.  (Yeah, it should be an assertion.)

-- Juliusz



More information about the Babel-users mailing list