Merge lp:~aacid/unity8/fix_qinputdeviceinfo_leaks into lp:unity8

Proposed by Albert Astals Cid
Status: Merged
Approved by: Michael Zanetti
Approved revision: 2411
Merged at revision: 2462
Proposed branch: lp:~aacid/unity8/fix_qinputdeviceinfo_leaks
Merge into: lp:unity8
Diff against target: 27 lines (+4/-0)
1 file modified
plugins/Unity/InputInfo/linux/qinputdeviceinfo_linux.cpp (+4/-0)
To merge this branch: bzr merge lp:~aacid/unity8/fix_qinputdeviceinfo_leaks
Reviewer Review Type Date Requested Status
Michael Zanetti (community) Approve
Unity8 CI Bot continuous-integration Approve
Review via email: mp+295799@code.launchpad.net

Commit message

Fix leaks in QInputDeviceManagerPrivate::addDevice

Description of the change

 * Are there any related MPs required for this MP to build/function as expected?
No

 * Did you perform an exploratory manual test run of your code change and any related functionality?
Yes

 * If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?
N/A

 * If you changed the UI, has there been a design review?
N/A

To post a comment you must log in.
2411. By Albert Astals Cid

mooo less

Revision history for this message
Lorn Potter (lorn-potter) wrote :

LGTM

Revision history for this message
Albert Astals Cid (aacid) wrote :

Lorn, can you top approve?

Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

PASSED: Continuous integration, rev:2411
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1303/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/1728
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=vivid+overlay,testname=qmluitests.sh/835
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/835
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=yakkety,testname=qmluitests.sh/835
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/1754
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/1704
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/1704
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=yakkety/1704
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1697
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1697/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1697
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1697/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/1697
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/1697/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1697
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1697/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1697
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1697/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/1697
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/1697/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/1697
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/1697/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/1697
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/1697/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/1697
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/1697/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1303/rebuild

review: Approve (continuous-integration)
Revision history for this message
Michael Zanetti (mzanetti) wrote :

lgtm too. Thanks!

* CI is ok

* tested fine

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/Unity/InputInfo/linux/qinputdeviceinfo_linux.cpp'
2--- plugins/Unity/InputInfo/linux/qinputdeviceinfo_linux.cpp 2015-12-04 19:48:17 +0000
3+++ plugins/Unity/InputInfo/linux/qinputdeviceinfo_linux.cpp 2016-05-26 08:03:03 +0000
4@@ -44,6 +44,7 @@
5 #include <libudev.h>
6 #include <libevdev/libevdev.h>
7 #include <fcntl.h>
8+#include <unistd.h>
9 #include <QDebug>
10 #include <QSocketNotifier>
11 #include <QTimer>
12@@ -168,6 +169,7 @@
13 rc = libevdev_new_from_fd(fd, &dev);
14 if (rc < 0) {
15 qWarning() << "Failed to init libevdev ("<< strerror(-rc) << ")";
16+ close(fd);
17 return Q_NULLPTR;
18 }
19
20@@ -195,6 +197,8 @@
21 }
22 }
23
24+ libevdev_free(dev);
25+ close(fd);
26 return inputDevice;
27 }
28

Subscribers

People subscribed via source and target branches