[PATCH] mbimcli: use g_strfreev instead of g_free to free g_strsplit results

Aleksander Morgado aleksander at aleksander.es
Mon Feb 24 09:04:55 PST 2014


On Mon, Feb 24, 2014 at 6:01 PM, Ben Chan <benchan at chromium.org> wrote:
> How about g_strdup the strings being returned, and then g_strfreev the
> string array? That's less efficient but makes the ownership transfer of the
> allocated strings more obvious. Also, we don't need to assume how g_strsplit
> actually allocates the string array as the glib API only suggests using
> g_strfreev.  How do you think?

Yeah, let's do that, it's not a big deal.

-- 
Aleksander
https://aleksander.es


More information about the libmbim-devel mailing list