Re: [Linuxwacom-devel] [PATCH libwacom 1/7] lib: free stylus keyfile after use
On Tue, 2012-04-24 at 15:02 +1000, Peter Hutterer wrote: Signed-off-by: Peter Hutterer peter.hutte...@who-t.net Reviewed-By: Bastien Nocera had...@hadess.net --- libwacom/libwacom-database.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/libwacom/libwacom-database.c b/libwacom/libwacom-database.c index 308ba6d..652a94e 100644 --- a/libwacom/libwacom-database.c +++ b/libwacom/libwacom-database.c @@ -219,6 +219,8 @@ libwacom_parse_stylus_keyfile(WacomDeviceDatabase *db, const char *path) g_hash_table_insert (db-stylus_ht, GINT_TO_POINTER (id), stylus); } g_strfreev (groups); + if (keyfile) + g_key_file_free (keyfile); } struct { -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Linuxwacom-devel mailing list Linuxwacom-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel
Re: [Linuxwacom-devel] [PATCH libwacom 2/7] tools: print error if db failed to initialise
On Tue, 2012-04-24 at 15:02 +1000, Peter Hutterer wrote: Signed-off-by: Peter Hutterer peter.hutte...@who-t.net Reviewed-By: Bastien Nocera had...@hadess.net --- tools/list-local-devices.c |4 1 file changed, 4 insertions(+) diff --git a/tools/list-local-devices.c b/tools/list-local-devices.c index 1f7bd56..3dbba3d 100644 --- a/tools/list-local-devices.c +++ b/tools/list-local-devices.c @@ -47,6 +47,10 @@ int main(int argc, char **argv) struct dirent **namelist = NULL; db = libwacom_database_new_for_path(TOPSRCDIR/data); + if (!db) { + fprintf(stderr, Failed to initialize device database\n); + return 1; + } i = scandir(/dev/input, namelist, event_devices_only, alphasort); -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Linuxwacom-devel mailing list Linuxwacom-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel
Re: [Linuxwacom-devel] [PATCH libwacom 3/7] tools: try the system-installed database if the local one fails
On Tue, 2012-04-24 at 15:02 +1000, Peter Hutterer wrote: Signed-off-by: Peter Hutterer peter.hutte...@who-t.net Is this wise? The tool isn't supposed to be installed, or is it? If it is, then we shouldn't be starting with trying to read the DB from the local source tree. --- tools/list-local-devices.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/list-local-devices.c b/tools/list-local-devices.c index 3dbba3d..1702790 100644 --- a/tools/list-local-devices.c +++ b/tools/list-local-devices.c @@ -47,6 +47,8 @@ int main(int argc, char **argv) struct dirent **namelist = NULL; db = libwacom_database_new_for_path(TOPSRCDIR/data); + if (!db) + db = libwacom_database_new(); if (!db) { fprintf(stderr, Failed to initialize device database\n); return 1; -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Linuxwacom-devel mailing list Linuxwacom-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel