instance: strdup string attributes
authorDaniel Golle <daniel@makrotopia.org>
Sat, 4 Jan 2020 14:16:12 +0000 (16:16 +0200)
committerPetr Štetiar <ynezz@true.cz>
Sun, 5 Jan 2020 11:50:55 +0000 (12:50 +0100)
commita5af33ce9a16f6aa599f19cc7161e067fab9495d
tree5ed93f984e513fdc63104b8b0b9e922a1c8dc4d4
parentd2e8bf6ef7cf0e037475a485cdf0321756dcb928
instance: strdup string attributes

Previously string attributes were set to pointers returned by
blobmsg_get_string() which caused use-after-free problems.
Use strdup() to have copies of all stored strings and free them
during cleanup.

Reviewed-by: Petr Štetiar <ynezz@true.cz>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
service/instance.c