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 392359 - [ffmpegenc] potential crash in dispose due to double-free
[ffmpegenc] potential crash in dispose due to double-free
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-libav
git master
Other Linux
: Normal normal
: 0.10.3
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2007-01-03 16:34 UTC by Sebastien Cote
Modified: 2007-01-03 17:00 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Sebastien Cote 2007-01-03 16:34:00 UTC
The gstffmpegenc module frees memory in the objet's dispose method instead of finalize. Sometimes, the dispose method is called more than once and this leads to crashes.

Since the current code doesn't do any kind of check, memory recovery should be done in the finalize method.

http://le-hacker.org/papers/gobject/ch05.html#howto-gobject-destruction
Comment 1 Tim-Philipp Müller 2007-01-03 17:00:16 UTC
You've actually run into this in practice? Anyway, fixed in CVS, thanks for the bug report:

 2007-01-03  Tim-Philipp Müller  <tim at centricular dot net>

       * ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_class_init),
       (gst_ffmpegenc_finalize):
         Turn dispose function into finalize function to avoid double-frees
         and potential crashes caused by them in some circumstances.
         Fixes #392395.