~ubuntu-branches/ubuntu/utopic/libgtop2/utopic-proposed

« back to all changes in this revision

Viewing changes to debian/patches/50_linux260_leak_fix.patch

  • Committer: Bazaar Package Importer
  • Author(s): Didier Roche
  • Date: 2009-02-17 23:12:12 UTC
  • mfrom: (1.1.14 upstream)
  • Revision ID: james.westby@ubuntu.com-20090217231212-yhcddg53iyuwddsl
Tags: 2.25.91-0ubuntu1
* New upstream release (LP: #330751)
  - Synced with gnome-2-24.
  - Fixed license: libgtop is GPL-2.
  - linux:
    - fixed potential memory leak.
    - fixed read(2) usage. Should fix the missing cpus bug in
      system-monitor.
  - darwin:
    - fixed build. "paul".
* debian/patches/50_linux260_leak_fix.patch removed: upstream fixed it

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
diff -Nur -x '*.orig' -x '*~' libgtop2-2.24.0/sysdeps/linux/fsusage.c libgtop2-2.24.0.new/sysdeps/linux/fsusage.c
2
 
--- libgtop2-2.24.0/sysdeps/linux/fsusage.c     2008-06-23 13:43:45.000000000 -0700
3
 
+++ libgtop2-2.24.0.new/sysdeps/linux/fsusage.c 2008-12-16 09:56:16.000000000 -0800
4
 
@@ -142,10 +142,14 @@
5
 
 
6
 
        ret = try_file_to_buffer(buffer, sizeof buffer, filename);
7
 
 
8
 
-       if(ret < 0) return;
9
 
+       if (ret < 0) {
10
 
+               g_free(filename);
11
 
+               return;
12
 
+       }
13
 
 
14
 
        if (sscanf(buffer, format, &buf->read, &buf->write) != 2) {
15
 
                glibtop_warn_io_r(server, "Could not parse %s", filename);
16
 
+               g_free(filename);
17
 
                return;
18
 
        }
19