Bug 515024

Summary: kradio-1.0beta3b_20060920-226.5: 2 * bad call to delete
Product: [openSUSE] openSUSE 11.2 Reporter: David Binderman <dcb314>
Component: KDE4 ApplicationsAssignee: E-mail List <kde-maintainers>
Status: RESOLVED DUPLICATE QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: forgotten_h8XpMSaN1v
Version: Factory   
Target Milestone: ---   
Hardware: All   
OS: openSUSE 11.1   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description David Binderman 2009-06-21 09:05:29 UTC
I just had a look at factory package kradio-1.0beta3b_20060920-226.5
In file kradio3/plugins/recording/encoder_ogg.cpp, around line 125
is the code

static void vorbis_comment_add_tag_new(vorbis_comment *vc, const QString &tag, const QString &value)
{
    char *stag   = strdup(tag.ascii());
    char *svalue = strdup(value.utf8());
    vorbis_comment_add_tag(vc, stag, svalue);
    delete stag;
    delete svalue;
}

The return value from strdup should be freed by calling free(), not
by calling delete.

Suggest code rework.
Comment 1 Lubos Lunak 2009-06-22 13:32:36 UTC
http://kradio.sourceforge.net/

*** This bug has been marked as a duplicate of bug 442933 ***
Comment 2 Forgotten User h8XpMSaN1v 2009-06-22 18:07:31 UTC
Hi all!
This bug is fixed in the trunk of the KRadio SVN (r949). It will be part of KRadio 4.0.1. However, 4.0.1 will need a bit more time for testing and bug fixing since the ALSA device selection has been
reworked and because I'm currently quite busy with other stuff. Please have a look at https://bugzilla.novell.com/show_bug.cgi?id=500021.
BR, Martin