charon-nm: Fix building list of DNS/MDNS servers with libnm
authorTobias Brunner <tobias@strongswan.org>
Wed, 21 Feb 2018 10:53:55 +0000 (11:53 +0100)
committerTobias Brunner <tobias@strongswan.org>
Thu, 22 Feb 2018 08:05:48 +0000 (09:05 +0100)
commitee8c25516a97a2c880a8033e1663628b6b05646a
treef0690cdcf4d380d4177322400445e7d4c50e461b
parent9ba01ce3807c0e85e3d90736a09f29f2979b9181
charon-nm: Fix building list of DNS/MDNS servers with libnm

g_variant_builder_add() creates a new GVariant using g_variant_new() and
then adds it to the builder.  Passing a GVariant probably adds the
pointer to the array, not the value.  I think an alternative fix would
be to use "@u" as type string for the g_variant_builder_add() call, then
the already allocated GVariant is adopted.

Fixes: 9a71b7219ca3 ("charon-nm: Port to libnm")
src/charon-nm/nm/nm_service.c