diff options
author | Richard Hughes <richard@hughsie.com> | 2022-09-09 12:28:43 +0100 |
---|---|---|
committer | Richard Hughes <richard@hughsie.com> | 2022-09-09 13:16:21 +0100 |
commit | 11f1e05d98aad24f2ee517d165a017f247458cca (patch) | |
tree | d1717a92bca0db0e56540136ebf75828f90a0478 /gusb/gusb-device-event.c | |
parent | 1d2185e959a69fd29199e08015b065a3d17152fc (diff) | |
download | gusb-11f1e05d98aad24f2ee517d165a017f247458cca.tar.gz |
Fix loading events using _g_usb_device_event_load()
Diffstat (limited to 'gusb/gusb-device-event.c')
-rw-r--r-- | gusb/gusb-device-event.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gusb/gusb-device-event.c b/gusb/gusb-device-event.c index 9d3aa4e..4f38131 100644 --- a/gusb/gusb-device-event.c +++ b/gusb/gusb-device-event.c @@ -57,7 +57,7 @@ _g_usb_device_event_load(GUsbDeviceEvent *self, JsonObject *json_object, GError #if JSON_CHECK_VERSION(1, 6, 0) /* optional properties */ - self->id = json_object_get_string_member_with_default(json_object, "Id", NULL); + self->id = g_strdup(json_object_get_string_member_with_default(json_object, "Id", NULL)); /* extra data */ str = json_object_get_string_member_with_default(json_object, "Data", NULL); |