mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-11-06 05:04:17 +01:00
Global: fix memleaks
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
#include "detection/gtk_qt/gtk_qt.h"
|
||||
#include "detection/displayserver/displayserver.h"
|
||||
#include "util/stringUtils.h"
|
||||
#include "util/mallocHelper.h"
|
||||
|
||||
static bool detectWMThemeFromConfigFile(const char* configFile, const char* themeRegex, const char* defaultValue, FFstrbuf* themeOrError)
|
||||
{
|
||||
@@ -91,8 +92,8 @@ static bool detectMutter(FFstrbuf* themeOrError)
|
||||
|
||||
static bool detectMuffin(FFstrbuf* themeOrError)
|
||||
{
|
||||
const char* name = ffSettingsGet("/org/cinnamon/theme/name", "org.cinnamon.theme", NULL, "name", FF_VARIANT_TYPE_STRING).strValue;
|
||||
const char* theme = ffSettingsGet("/org/cinnamon/desktop/wm/preferences/theme", "org.cinnamon.desktop.wm.preferences", NULL, "theme", FF_VARIANT_TYPE_STRING).strValue;
|
||||
FF_AUTO_FREE const char* name = ffSettingsGet("/org/cinnamon/theme/name", "org.cinnamon.theme", NULL, "name", FF_VARIANT_TYPE_STRING).strValue;
|
||||
FF_AUTO_FREE const char* theme = ffSettingsGet("/org/cinnamon/desktop/wm/preferences/theme", "org.cinnamon.desktop.wm.preferences", NULL, "theme", FF_VARIANT_TYPE_STRING).strValue;
|
||||
|
||||
if(name == NULL && theme == NULL)
|
||||
{
|
||||
@@ -133,7 +134,7 @@ static bool detectXFWM4(FFstrbuf* themeOrError)
|
||||
static bool detectOpenbox(const FFstrbuf* dePrettyName, FFstrbuf* themeOrError)
|
||||
{
|
||||
FF_STRBUF_AUTO_DESTROY absolutePath = ffStrbufCreateA(64);
|
||||
const char *configFileSubpath = "openbox/rc.xml";
|
||||
const char *configFileSubpath = "openbox/rc.xml";
|
||||
if (ffStrbufIgnCaseCompS(dePrettyName, "LXQt") == 0)
|
||||
configFileSubpath = "openbox/lxqt-rc.xml";
|
||||
else if (ffStrbufIgnCaseCompS(dePrettyName, "LXDE") == 0)
|
||||
|
||||
Reference in New Issue
Block a user