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 767009 - PedGeometry objects are memory leaked
PedGeometry objects are memory leaked
Status: RESOLVED FIXED
Product: gparted
Classification: Other
Component: application
GIT HEAD
Other Linux
: Normal normal
: ---
Assigned To: Mike Fleetwood
gparted maintainers alias
Depends on:
Blocks:
 
 
Reported: 2016-05-30 08:33 UTC by Mike Fleetwood
Modified: 2016-06-13 17:30 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Stop leaking PedGeometry object memory (v1) (3.85 KB, patch)
2016-05-30 09:01 UTC, Mike Fleetwood
none Details | Review

Description Mike Fleetwood 2016-05-30 08:33:04 UTC
Fragment from my commit message:

  Calling libparted ped_geometry_new() creates a new PedGeometry object
  from malloced memory, however the corresponding ped_geometry_destroy()
  is never called to destroy the object and free the memory.

Fix to follow shortly,
Mike
Comment 1 Mike Fleetwood 2016-05-30 09:01:52 UTC
Created attachment 328711 [details] [review]
Stop leaking PedGeometry object memory (v1)

Hi Curtis,

Here's patch v1 for this.

Thanks,
Mike
Comment 2 Curtis Gedak 2016-05-30 17:17:21 UTC
Hi Mike,

Good catch on this memory leak.  I applied patch v1 from comment #1 and in my testing all worked as expected and I did not discover any regressions.

Patch v1 from comment #1 has been committed to the git repository for inclusion in the next release of GParted.

The relevant git commit can be viewed at the following link:

Stop leaking PedGeometry object memory (#767009)
https://git.gnome.org/browse/gparted/commit/?id=3724421e3037d1faeeefe1786c8908431b313334

Curtis
Comment 3 Curtis Gedak 2016-06-13 17:30:56 UTC
This enhancement was included in the GParted 0.26.1 release on June 13, 2016.