~ubuntu-branches/ubuntu/raring/consolekit/raring

« back to all changes in this revision

Viewing changes to debian/patches/03-cleanup_console_tags.patch

  • Committer: Package Import Robot
  • Author(s): Steve Langasek
  • Date: 2013-01-23 14:06:31 UTC
  • Revision ID: package-import@ubuntu.com-20130123140631-i3y6poewzas22kes
Tags: 0.4.5-3.1ubuntu1
debian/patches/03-cleanup_console_tags.patch: call g_dir_close() when
we're done, fixing a small memory leak.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
Cleanup console tag files on application startup and shutdown.
2
2
 
3
 
Index: consolekit/src/main.c
 
3
Index: consolekit-0.4.5/src/main.c
4
4
===================================================================
5
 
--- consolekit.orig/src/main.c  2010-11-17 07:02:23.030817878 +0100
6
 
+++ consolekit/src/main.c       2010-11-17 07:03:17.434814872 +0100
7
 
@@ -148,6 +148,43 @@
 
5
--- consolekit-0.4.5.orig/src/main.c
 
6
+++ consolekit-0.4.5/src/main.c
 
7
@@ -148,6 +148,44 @@
8
8
         unlink (CONSOLE_KIT_PID_FILE);
9
9
 }
10
10
 
36
36
+               }
37
37
+               g_free (file);
38
38
+       }
 
39
+       g_dir_close (dir);
39
40
+}
40
41
+
41
42
+static void
48
49
 /* copied from nautilus */
49
50
 static int debug_log_pipes[2];
50
51
 
51
 
@@ -228,7 +265,7 @@
 
52
@@ -228,7 +266,7 @@
52
53
                 snprintf (pid, sizeof (pid), "%lu\n", (long unsigned) getpid ());
53
54
                 written = write (pf, pid, strlen (pid));
54
55
                 close (pf);
57
58
         } else {
58
59
                 g_warning ("Unable to write pid file %s: %s",
59
60
                            CONSOLE_KIT_PID_FILE,
60
 
@@ -317,6 +354,8 @@
 
61
@@ -317,6 +355,8 @@
61
62
                 goto out;
62
63
         }
63
64