[ovs-dev] [bond 2/2] bond: Fix ugly warnings at slave registration.

Ben Pfaff blp at nicira.com
Mon Apr 18 23:31:41 UTC 2011


On Mon, Apr 18, 2011 at 04:27:28PM -0700, Ethan Jackson wrote:
> I debated doing that.  I suppose it would be fine.  The most straight
> forward way would be to malloc it in the if (!slave) conditional, it
> would later be freed and then realloced in the same function.  Not a
> big deal though.

if (!slave) {
   ...
} else {
   free(slave->name);
}
slave->name = xstrdup(netdev_get_name(netdev));



More information about the dev mailing list