[gtk/gtk-3-24: 1/2] gtkprintbackend:backend_create: avoid strdup+free
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/gtk-3-24: 1/2] gtkprintbackend:backend_create: avoid strdup+free
- Date: Sun, 25 Aug 2019 12:03:21 +0000 (UTC)
commit 4bc34c3bcf5aaee30ca3ff17d9210af81119b5c6
Author: Дилян Палаузов <git-dpa aegee org>
Date: Thu Jul 11 10:39:39 2019 +0000
gtkprintbackend:backend_create: avoid strdup+free
gtk/gtkprintbackend.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
---
diff --git a/gtk/gtkprintbackend.c b/gtk/gtkprintbackend.c
index 24bb2f9fcb..0151150ebb 100644
--- a/gtk/gtkprintbackend.c
+++ b/gtk/gtkprintbackend.c
@@ -278,7 +278,7 @@ _gtk_print_backend_create (const gchar *backend_name)
pb_module = g_object_new (GTK_TYPE_PRINT_BACKEND_MODULE, NULL);
g_type_module_set_name (G_TYPE_MODULE (pb_module), backend_name);
- pb_module->path = g_strdup (module_path);
+ pb_module->path = module_path;
loaded_backends = g_slist_prepend (loaded_backends,
pb_module);
@@ -291,8 +291,6 @@ _gtk_print_backend_create (const gchar *backend_name)
*/
g_type_module_use (G_TYPE_MODULE (pb_module));
}
-
- g_free (module_path);
}
return pb;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]