Mahmoud Mandour <ma.mando...@gmail.com> writes:
> Given this is start-up code I think you could use g_new instead of > g_try_new. As it will abort on no memory you can avoid the early return > check bellow. Also is elf_phdata never persists beyond this function you > could use g_autofree (and use g_steal_pointer on the one case when it is > returned if you need it) > > I would also split this patch, one for each function you convert. > > > Thank you for the valuable suggestions, these are obviously the better > way to go. I will hopefully employ them. > I'm now busy with my final exams. In a week or so, I will make the > changes again and properly, split the patch, and then send it as a > series regarding this file. We are also trying to improve the language in the coding style document if you see the thread: Subject: [RFC PATCH] docs/devel: expand style section of memory management Date: Mon, 15 Mar 2021 16:53:12 +0000 Message-Id: <20210315165312.22453-1-alex.ben...@linaro.org> apologies, I did intend to cc you as well but forgot in my haste to post. > > Thanks > Mahmoud Mandour -- Alex Bennée