summaryrefslogtreecommitdiff
path: root/libcaja-private/caja-file-utilities.c
diff options
context:
space:
mode:
authorMonsta <[email protected]>2014-12-03 16:05:43 +0300
committerinfirit <[email protected]>2014-12-10 10:38:37 +0100
commit523ca6754f1f1f5e86367c644bb721b20f5fbebd (patch)
treec34b3bae093a37a7d7594cc4efa3168726ce5340 /libcaja-private/caja-file-utilities.c
parent78661bd703b26343621b209f4f13e5e9fcbad802 (diff)
downloadcaja-523ca6754f1f1f5e86367c644bb721b20f5fbebd.tar.bz2
caja-523ca6754f1f1f5e86367c644bb721b20f5fbebd.tar.xz
libcaja-private: don't leak memory
Diffstat (limited to 'libcaja-private/caja-file-utilities.c')
-rw-r--r--libcaja-private/caja-file-utilities.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/libcaja-private/caja-file-utilities.c b/libcaja-private/caja-file-utilities.c
index cc08be57..dd8b449c 100644
--- a/libcaja-private/caja-file-utilities.c
+++ b/libcaja-private/caja-file-utilities.c
@@ -1107,18 +1107,13 @@ caja_find_file_insensitive_next (GFile *parent, const gchar *name)
gboolean
caja_is_engrampa_installed (void)
{
- static int installed = - 1;
+ static int installed = -1;
if (installed < 0)
{
- if (g_find_program_in_path ("engrampa"))
- {
- installed = 1;
- }
- else
- {
- installed = 0;
- }
+ gchar *found = g_find_program_in_path ("engrampa");
+ installed = found ? 1 : 0;
+ g_free (found);
}
return installed > 0 ? TRUE : FALSE;