diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2024-01-15 19:42:05 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2024-01-16 11:01:08 +0100 |
commit | 3b359cee6888f9241987bf12161a84afe6a30deb (patch) | |
tree | b359bb50457aec06c767c1af20e77b699b2af135 /vcl | |
parent | 40893131ed889ce112f5876733b89729917e8dd7 (diff) |
Add missing g_free in salnativewidgets-gtk + reorder ones in cpdmgr (vcl)
Change-Id: I2608a2fe238d124f3a158438e8219fbc63f750d8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162132
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/unx/generic/printer/cpdmgr.cxx | 5 | ||||
-rw-r--r-- | vcl/unx/gtk3/salnativewidgets-gtk.cxx | 1 |
2 files changed, 4 insertions, 2 deletions
diff --git a/vcl/unx/generic/printer/cpdmgr.cxx b/vcl/unx/generic/printer/cpdmgr.cxx index 834c1383efba..03cf85a7b75b 100644 --- a/vcl/unx/generic/printer/cpdmgr.cxx +++ b/vcl/unx/generic/printer/cpdmgr.cxx @@ -81,9 +81,9 @@ void CPDManager::onNameAcquired (GDBusConnection *connection, G_DBUS_CALL_FLAGS_NONE, -1, nullptr, nullptr, nullptr); - g_free(contents); g_object_unref(proxy); g_dbus_node_info_unref(introspection_data); + g_free(contents); } g_free(backend.second); } @@ -122,10 +122,10 @@ void CPDManager::printerAdded (GDBusConnection *connection, nullptr, nullptr); - g_free(contents); g_dbus_node_info_unref(introspection_data); std::pair<std::string, GDBusProxy *> new_backend (sender_name, proxy); current->addBackend(std::move(new_backend)); + g_free(contents); } } CPDPrinter *pDest = static_cast<CPDPrinter *>(malloc(sizeof(CPDPrinter))); @@ -262,6 +262,7 @@ CPDManager* CPDManager::tryLoadCPD() { std::pair<std::string, gchar*> new_tbackend (filename, contents); pManager->addTempBackend(new_tbackend); + g_free(contents); } } g_dir_close(dir); diff --git a/vcl/unx/gtk3/salnativewidgets-gtk.cxx b/vcl/unx/gtk3/salnativewidgets-gtk.cxx index a3a82edaa1ac..bfdeed423846 100644 --- a/vcl/unx/gtk3/salnativewidgets-gtk.cxx +++ b/vcl/unx/gtk3/salnativewidgets-gtk.cxx @@ -2332,6 +2332,7 @@ bool GtkSalGraphics::updateSettings(AllSettings& rSettings) gchar* pFontname = nullptr; g_object_get(pSettings, "gtk-font-name", &pFontname, nullptr); PangoFontDescription* pFontDesc = pango_font_description_from_string(pFontname); + g_free(pFontname); vcl::Font aFont(pango_to_vcl(pFontDesc, rSettings.GetUILanguageTag().getLocale())); pango_font_description_free(pFontDesc); #else |