horchi / vdr-plugin-epg2vdr

GNU General Public License v2.0
2 stars 2 forks source link

gcc13 warning: pointer used after ‘free’ #2

Closed kfb77 closed 10 months ago

kfb77 commented 10 months ago

gcc13 print out warning: pointer used after ‘free’ skipspace() from VDR does not copy the string. So you can not use it after a free of the original string. This will fix it:

diff --git a/epg2vdr.c b/epg2vdr.c index 7d10a79..fc6106c 100644 --- a/epg2vdr.c +++ b/epg2vdr.c @@ -742,8 +742,8 @@ cString cPluginEPG2VDR::SVDRPCommand(const char cmd, const char Option, int &R cReplayControl::SetRecording(recording->FileName()); cControl::Launch(new cReplayControl); cControl::Attach(); - free(opt); tell(0, "Playing recording '%s'", name); + free(opt); return "Playing recording"; }

horchi commented 10 months ago

Thx fixed now