<p><code>utils_free_pointers()</code> has a clear name, but requires a leading count of pointers, which could be too big or too small, and a trailing NULL, to try to detect if the count is too big.</p>
<p>I realized now we require C99, we can solve all these issues with a macro:</p>
<div class="highlight highlight-source-c"><pre>#<span class="pl-k">define</span> <span class="pl-en">FREE_EACH</span>(...) <span class="pl-k">do</span> { \
    <span class="pl-k">void</span> *_arr[] = {__VA_ARGS__}; \
    <span class="pl-k">for</span> (guint _i = <span class="pl-c1">0</span>; _i < <span class="pl-c1">G_N_ELEMENTS</span>(_arr); _i++) \
        <span class="pl-c1">g_free</span>(_arr[_i]); \
    } <span class="pl-k">while</span> (<span class="pl-c1">0</span>)</pre></div>
<p>Shall I make a PR?</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/geany/geany/issues/2288?email_source=notifications&email_token=AAIOWJ2OEZ3ZA5VB4DELT2DQIJNZHA5CNFSM4IUJHTUKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HJZ7JGA">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAIOWJ75K5YJNQKKA442N7TQIJNZHANCNFSM4IUJHTUA">mute the thread</a>.<img src="https://github.com/notifications/beacon/AAIOWJ6CCVT5NGY2GBYVVCDQIJNZHA5CNFSM4IUJHTUKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HJZ7JGA.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/geany/geany/issues/2288?email_source=notifications\u0026email_token=AAIOWJ2OEZ3ZA5VB4DELT2DQIJNZHA5CNFSM4IUJHTUKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HJZ7JGA",
"url": "https://github.com/geany/geany/issues/2288?email_source=notifications\u0026email_token=AAIOWJ2OEZ3ZA5VB4DELT2DQIJNZHA5CNFSM4IUJHTUKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HJZ7JGA",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>