[gnome-desktop] pnp-ids: Fix possible free of static string on non-udev platforms
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-desktop] pnp-ids: Fix possible free of static string on non-udev platforms
- Date: Mon, 5 Sep 2016 10:00:35 +0000 (UTC)
commit 1acdc895650d9c624b3ea3674e09f9918d3959d1
Author: Hyungwon Hwang <hyungwon hwang7 gmail com>
Date: Thu Sep 1 08:08:11 2016 +0900
pnp-ids: Fix possible free of static string on non-udev platforms
gnome_pnp_ids_get_pnp_id() should always return a dynamically allocated
string as its API.
https://bugzilla.gnome.org/show_bug.cgi?id=770686
libgnome-desktop/gnome-pnp-ids.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/libgnome-desktop/gnome-pnp-ids.c b/libgnome-desktop/gnome-pnp-ids.c
index 7ad2caf..40e640e 100644
--- a/libgnome-desktop/gnome-pnp-ids.c
+++ b/libgnome-desktop/gnome-pnp-ids.c
@@ -78,7 +78,7 @@ gnome_pnp_ids_get_pnp_id (GnomePnpIds *pnp_ids, const gchar *pnp_id)
return ret;
#else
- return "Undefined";
+ return g_strdup ("Undefined");
#endif
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]