Tags: patch

I found the problem.. it looks like the upstream change that started using
sysfs in preference to usbfs (gnome-pilot/gpilotd/gpilot.d 1.151) neglected
to free the memory it allocated by calling g_file_get_contents(). I've
attached a patch below.

If you would, please forward this patch along to the right Bugzilla place.. I
can't make heads or tails of that thing.

thanks,
 -Brian


--- gpilotd/gpilotd.c.orig      2006-09-05 00:16:41.000000000 -0700
+++ gpilotd/gpilotd.c   2006-09-24 23:28:23.000000000 -0700
@@ -1313,6 +1313,7 @@
                                }
                                vend_id = g_strndup (fcontent, 4);
                                g_free (fname);
+                               g_free (fcontent);
 
                                fname = g_build_filename (sysfs_dir_name, entry,
                                    f_prod, NULL);
@@ -1327,6 +1328,7 @@
                                }
                                prod_id = g_strndup (fcontent, 4);
                                g_free (fname);
+                               g_free (fcontent);
 
                                to_match = g_strconcat ("Vendor=", vend_id,
                                    " ProdID=", prod_id, NULL);

Reply via email to