memory leaks when setting dtstart
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
qtorganizer5-eds (Ubuntu) |
Fix Released
|
Medium
|
Renato Araujo Oliveira Filho |
Bug Description
engine.cpp is doing something like this to save the event time:
dt->value = g_new0(struct icaltimetype, 1);
*dt->value = icaltime_
e_cal_component
g_free (dt->value);
g_free ((gchar *) dt->tzid);
dt->value = NULL;
dt->tzid = NULL;
So qtorganizer5-eds is leaking those 'dt' pointers.
Really, I think neither of the heap operations are necessary here. You should be able to do something like:
struct icaltimetype ict = icaltime_
dt.tzid = NULL;
dt.value = &ict;
// all on the stack, so nothing to free
Related branches
- Michael Sheldon (community): Approve
- PS Jenkins bot: Approve (continuous-integration)
- Ubuntu Phablet Team: Pending requested
-
Diff: 109 lines (+28/-28)1 file modifiedqorganizer/qorganizer-eds-engine.cpp (+28/-28)
Changed in qtorganizer5-eds (Ubuntu): | |
assignee: | nobody → Renato Araujo Oliveira Filho (renatofilho) |
This bug was fixed in the package qtorganizer5-eds - 0.1.1+14. 04.20140228. 1-0ubuntu1
--------------- 14.04.20140228. 1-0ubuntu1) trusty; urgency=low
qtorganizer5-eds (0.1.1+
[ Renato Araujo Oliveira Filho ] ccurrenceFetchR equest. teTime object. (LP: #1285056)
* Make sure to remove the request from internal list when it get
destroyed. (LP: #1284587)
* Implemented support for QOrganizerItemO
* Fixed memory leaks of ECalComponentDa
-- Ubuntu daily release <email address hidden> Fri, 28 Feb 2014 23:37:02 +0000