summaryrefslogtreecommitdiff
path: root/libnautilus-private
diff options
context:
space:
mode:
authorPavel Vasin <rat4vier@gmail.com>2012-08-24 15:14:19 +0400
committerCosimo Cecchi <cosimoc@gnome.org>2012-08-24 18:41:33 +0200
commit523073f86b983f2fa21c8a9b579c58df0293e081 (patch)
tree92e3c8cd2d26adeef111eabccc6e325aaac809eb /libnautilus-private
parentc092d25e907507a1dba0185a70557bd4fccb2e3b (diff)
downloadnautilus-523073f86b983f2fa21c8a9b579c58df0293e081.tar.gz
file-utilities: fix leaked path string
https://bugzilla.gnome.org/show_bug.cgi?id=682603
Diffstat (limited to 'libnautilus-private')
-rw-r--r--libnautilus-private/nautilus-file-utilities.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/libnautilus-private/nautilus-file-utilities.c b/libnautilus-private/nautilus-file-utilities.c
index 22ccd0013..8cb3359d0 100644
--- a/libnautilus-private/nautilus-file-utilities.c
+++ b/libnautilus-private/nautilus-file-utilities.c
@@ -748,13 +748,25 @@ nautilus_find_existing_uri_in_hierarchy (GFile *location)
return location;
}
+static gboolean
+have_program_in_path (const char *name)
+{
+ gchar *path;
+ gboolean result;
+
+ path = g_find_program_in_path (name);
+ result = (path != NULL);
+ g_free (path);
+ return result;
+}
+
gboolean
nautilus_is_file_roller_installed (void)
{
static int installed = - 1;
if (installed < 0) {
- if (g_find_program_in_path ("file-roller")) {
+ if (have_program_in_path ("file-roller")) {
installed = 1;
} else {
installed = 0;