gdbus, p2p-gdbus: fix a memory leak 70/270770/1
authorAdam Michalski <a.michalski2@partner.samsung.com>
Tue, 8 Feb 2022 15:01:35 +0000 (16:01 +0100)
committerAdam Michalski <a.michalski2@partner.samsung.com>
Tue, 8 Feb 2022 15:01:35 +0000 (16:01 +0100)
commit23738a36f6491773a1a8c99ff80a977ccc2903e4
tree18888f6fe31b74dcb656157ae942b0f4cdbfdcfc
parentfb7d0e23a07b0975b66e0c47bff084eb4d77cd3c
gdbus, p2p-gdbus: fix a memory leak

Upon encountering an 's' in a format string, `g_variant_get()` takes
a pointer to a (gchar *) (i.e., (gchar **)) and sets it to
a newly-allocated copy of the string. It's the user's responsibility
to free up memory by using `g_free()`.

Change-Id: Ieec7ca25af592dfcdcca34dbe288ea347b80b102
benchmark/gdbus.c
benchmark/p2p-gdbus.c