[Pkg-xfce-devel] Bug#519181: xfce4-sensors-plugin: Patch providing working example code fix
dawitbro at sbcglobal.net
Mon Mar 23 12:01:52 UTC 2009
Tino Keitel wrote:
> in your previous mail, you wrote that the segfault is caused by calls
> to g_free() with an uninitialized checktext variable. Without looking
> at the code, wouldn't just initializing cleartext with NULL be a much
> smaller fix? I assume that g_free() behaves like free() here ("If ptr
> is NULL, no operation is performed"), at least it does so according to
> the glib documentation: "If mem is NULL it simply returns".
Unfortunately, I am not (yet) a programmer. I had never really used
'gdb' before Yves-Alexis asked me to in this thread. And, while I am
familiar with C and C++, I have never used the libraries required by
this package's source code.
With that lack of background, I tried to create the safest fix I know
how -- which turns out to involve about 9 changed lines instead of one.
Thank you for the response. Part of my purpose in posting the patch was
to get other eyes on the problem, under the (very likely) assumption
that there was something wrong with my approach... or at least a better way!
More information about the Pkg-xfce-devel