[Pkg-cli-apps-commits] [SCM] banshee-community-extensions branch, master, updated. debian/1.9.1-1-15-g120523e
Chow Loong Jin
hyperair at ubuntu.com
Sun Feb 20 08:49:26 UTC 2011
The following commit has been merged in the master branch:
commit cb02092eba70d1bafe03f2431c848d8f14ee96b5
Author: Chow Loong Jin <hyperair at ubuntu.com>
Date: Sun Feb 20 16:48:11 2011 +0800
Patch to fix compiler warning and some memory issues in Lirc
diff --git a/debian/patches/0001-Lirc-Fix-warning-and-potential-memory-issues.patch b/debian/patches/0001-Lirc-Fix-warning-and-potential-memory-issues.patch
new file mode 100644
index 0000000..678c52c
--- /dev/null
+++ b/debian/patches/0001-Lirc-Fix-warning-and-potential-memory-issues.patch
@@ -0,0 +1,43 @@
+From 2854587dc3635d2fd2c17b42e1c007506f946502 Mon Sep 17 00:00:00 2001
+From: Chow Loong Jin <hyperair at ubuntu.com>
+Date: Sun, 20 Feb 2011 16:33:08 +0800
+Subject: [PATCH] [Lirc] Fix warning and potential memory issues
+
+Fix the following issues:-
+ * Warning about control reaching the end of
+ lirc_glue_next_valid_command which has a non-void return value.
+ * Leakage of lirc code in the same function if it yielded a NULL
+ command from lirc_code2char
+ * Remove a free(command) that would only fire if command == NULL
+---
+ src/Lirc/lirc-glue/lirc-glue.c | 11 ++++++-----
+ 1 files changed, 6 insertions(+), 5 deletions(-)
+
+diff --git a/src/Lirc/lirc-glue/lirc-glue.c b/src/Lirc/lirc-glue/lirc-glue.c
+index bdb7ef7..793836c 100644
+--- a/src/Lirc/lirc-glue/lirc-glue.c
++++ b/src/Lirc/lirc-glue/lirc-glue.c
+@@ -46,14 +46,15 @@ char *lirc_glue_next_valid_command ()
+ } else {
+ lirc_glue_set_error (1); // means we don't have a code. totally normal for other unrelated button presses
+ }
++
++ free (code);
++
+ if (lirc_glue_get_error () < 1 ) {
+- free (code);
+- if (command != NULL)
+- return (command);
+- free (command);
+- return (NULL);
++ return (command);
+ }
+ }
++
++ return (NULL); // daemon shut down so no next code
+ }
+
+ struct lirc_config *lirc_glue_getconfig ()
+--
+1.7.1
+
diff --git a/debian/patches/series b/debian/patches/series
index 90e56bc..2f78b86 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
fix-ampache-unicode.patch
+0001-Lirc-Fix-warning-and-potential-memory-issues.patch
fsck-intltool.patch
--
banshee-community-extensions
More information about the Pkg-cli-apps-commits
mailing list