GNOME Bugzilla – Bug 779467
Improvements in application inialization
Last modified: 2017-03-05 21:44:35 UTC
There are two corner cases in the bijiben_application_local_command_line function where two memory leaks may happen. In the other hand, some improvements may be possible to application initialization as note paths arguments are converted back and forth to GFiles.
Created attachment 347052 [details] [review] fixed two possible memory leaks When executing bijiben_application_local_command_line function, if the remaining variable contains data, it is not freed if the code jumps to the out label. Also if there is no remaining data, files will remain with NULL. In that case there is an allocation that is not freed as the code jumps to the out label.
Created attachment 347053 [details] [review] Improved how files opening is handled This patch is a follow up of the last pach where two memory leaks were fixed. On one hand file paths were converted back and forth to GFiles, on the other hand paths were removed and added to the files_to_open queue. The code has been refactorized to avoid this and the files_to_open has been changed to a static variable to avoid a memory allocation.
Review of attachment 347052 [details] [review]: commit 0c5e079ca1a3c323c6d1c99603ff06f10c535fed Author: Iñigo Martínez <inigomartinez@gmail.com> Date: Sun Mar 5 22:32:52 2017 +0100 bjb-bijiben: fixed two memory leaks
Review of attachment 347053 [details] [review]: commit 39281eaac3a095ba3c7aa45631cfb10aa578a8a6 Author: Iñigo Martínez <inigomartinez@gmail.com> Date: Sun Mar 5 22:37:53 2017 +0100 bjb-bijiben: improved how files opening is handled