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 782045 - sharing: don't leak path
sharing: don't leak path
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: Sharing
unspecified
Other All
: Normal normal
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-05-02 05:26 UTC by Mohammed Sadiq
Modified: 2017-05-02 10:57 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
sharing: don't leak path (1.02 KB, patch)
2017-05-02 05:26 UTC, Mohammed Sadiq
none Details | Review
sharing: Don't leak path (1.02 KB, patch)
2017-05-02 10:25 UTC, Mohammed Sadiq
committed Details | Review

Description Mohammed Sadiq 2017-05-02 05:26:28 UTC
.
Comment 1 Mohammed Sadiq 2017-05-02 05:26:43 UTC
Created attachment 350841 [details] [review]
sharing: don't leak path

g_file_get_path allocates new memory for path.
So using g_strdup later would simply leak the previous allocation.
Comment 2 Bastien Nocera 2017-05-02 09:20:36 UTC
Review of attachment 350841 [details] [review]:

Looks good, but can you please use an upper case letter after the ":" in the subject, so:
sharing: Don't leak path
Comment 3 Mohammed Sadiq 2017-05-02 10:25:50 UTC
Created attachment 350855 [details] [review]
sharing: Don't leak path

g_file_get_path allocates new memory for path.
So using g_strdup later would simply leak the previous allocation.
Comment 4 Bastien Nocera 2017-05-02 10:27:23 UTC
Review of attachment 350855 [details] [review]:

You didn't need to upload a new patch, but thanks :)

Do you have commit access? If not, would you like to request one? I'd be happy to vouch for you.
Comment 5 Bastien Nocera 2017-05-02 10:57:29 UTC
Attachment 350855 [details] pushed as 4c0928f - sharing: Don't leak path