GNOME Bugzilla – Bug 309178
Small leak in main.c
Last modified: 2006-01-10 04:18:18 UTC
Attaching a patch
Created attachment 48441 [details] [review] proposed patch
Comment on attachment 48441 [details] [review] proposed patch thanks
confirming to get off my radar. Sorry for the spam.
Looks like the code changed under me here. Just relevant for gnome-2-10 now? or is it just a matter of s/save_file/meta_args.save_file/g on HEAD?
I don't know. Maybe Bjourn does as head made the relevant changes, though.
Yes substitution should work. Also, the MetaArguments struct contain three items that potentially may need freeing: save_file, display_name, client_id. Maybe a destructor function to do the work?
Changing the patch status since it doesn't apply in it's current form.
Created attachment 57053 [details] [review] Plug the leaks Okay, so after reading through the code and the GOption API documentation, I believe this plugs the three possible leaks. Also, since GOption automatically calls g_set_prgname() as a side effect of calling g_option_context_parse (), I removed our explicit call to it that isn't needed anymore.
Comment on attachment 57053 [details] [review] Plug the leaks Looks fine to me, thanks
2006-01-09 Elijah Newren <newren@gmail.com> Plug a few leaks. Fixes #309178. * src/main.c (main): remove an unneeded g_set_prgname() call, free some strings allocated by the GOptions parsing