After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 539396 - Free of potentially uninitialized pointer, also blocked build for me
Free of potentially uninitialized pointer, also blocked build for me
Status: RESOLVED DUPLICATE of bug 539829
Product: GnuCash
Classification: Other
Component: Backend - SQL
git-master
Other All
: Normal normal
: ---
Assigned To: Chris Shoemaker
Chris Shoemaker
Depends on:
Blocks:
 
 
Reported: 2008-06-21 01:18 UTC by Daniel Vainsencher
Modified: 2018-06-29 22:05 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed patch - initialize point to NULL at definition. (403 bytes, patch)
2008-06-21 01:21 UTC, Daniel Vainsencher
none Details | Review

Description Daniel Vainsencher 2008-06-21 01:18:14 UTC
Please describe the problem:
In qofsession.c qof_session_save initializes msg only after some conditions, some of which can cause execution to get to the leave section, in which it is freed if not NULL.

Steps to reproduce:
1. Compile the file, get a warning.
2. I built directly from SVN (make), got a "warning treated as errors" therefore had to fix it to proceed.


Actual results:


Expected results:


Does this happen every time?


Other information:
Comment 1 Daniel Vainsencher 2008-06-21 01:21:07 UTC
Created attachment 113154 [details] [review]
Proposed patch - initialize point to NULL at definition.

Removed the warning, allowed me to complete compilation, and I think it should prevent possible bugs (though, not using the backend, I never saw an actual bug in the first place).
Comment 2 Charles Day 2008-06-25 03:45:39 UTC
Thanks, Daniel. I wish I had seen your bug report earlier, as it would saved some time, but in the end this one got worked out independently on the gnucash-devel mailing list. This is now fixed as of r17248. Backport requested for 2.2.
Comment 3 Charles Day 2008-06-25 03:46:12 UTC

*** This bug has been marked as a duplicate of 539829 ***
Comment 4 John Ralls 2018-06-29 22:05:54 UTC
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=539396. Please update any external references or bookmarks.