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 712360 - procman_pkexec free result of g_strdup_printf
procman_pkexec free result of g_strdup_printf
Status: RESOLVED FIXED
Product: system-monitor
Classification: Core
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: System-monitor maintainers
System-monitor maintainers
Depends on:
Blocks:
 
 
Reported: 2013-11-15 11:35 UTC by Jack Leigh
Modified: 2013-11-16 10:29 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch - free string (1.29 KB, patch)
2013-11-15 11:35 UTC, Jack Leigh
needs-work Details | Review
patch - free string (1.33 KB, patch)
2013-11-15 12:08 UTC, Jack Leigh
committed Details | Review

Description Jack Leigh 2013-11-15 11:35:47 UTC
Created attachment 259866 [details] [review]
patch - free string

Patch attached.
Comment 1 Robert Roth 2013-11-15 12:01:20 UTC
Review of attachment 259866 [details] [review]:

Thanks for the patch, and finding the leak, however I'd like to avoid using goto where possible. As the only action skipped by the goto is ret = TRUE (and the g_message), that could be put into the else branch of the if statement, and g_free would come after the else branch, being always executed. What do you think?
Comment 2 Jack Leigh 2013-11-15 12:08:00 UTC
Created attachment 259868 [details] [review]
patch - free string

Sure
Comment 3 Robert Roth 2013-11-16 09:43:45 UTC
Review of attachment 259868 [details] [review]:

Thanks, looks ok.
Comment 4 Robert Roth 2013-11-16 10:29:15 UTC
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.