plasma-desktop-5.12.3 bug report

David Binderman dcb314 at hotmail.com
Wed Mar 7 09:02:17 UTC 2018


Hello there,


plasma-desktop-5.12.3/kcms/hardware/joystick/joydevice.cpp:188]: (error) Memory leak: oldCorr

Source code is

  if ( ::ioctl(fd, JSIOCGCORR, oldCorr) == -1 )
  {
    ::close(fd);
    delete [] oldCorr;
    return JoyDevice::ERR_GET_CORR;
  }

  if (bt < 0) {
      return JoyDevice::ERR_GET_BUTTONS;
  }

One if statement tidies things up, the other doesn't. Suggest code rework.
It would also be more efficient if the sanity check for bt were moved
to just after where it is set up.

Regards

David Binderman


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20180307/b62bbe71/attachment.html>


More information about the Plasma-devel mailing list