<p><b>@codebrainz</b> commented on this pull request.</p>

<hr>

<p>In <a href="https://github.com/geany/geany-plugins/pull/755#discussion_r195600055">geanyctags/src/geanyctags.c</a>:</p>
<pre style='color:#555'>> @@ -205,6 +205,26 @@ static gchar *generate_find_string(GeanyProject *prj)
 }
 
 
+static const gchar *get_base_path(void)
+{
+       static gchar *ret = NULL;
</pre>
<p>You could always just return a non-static allocated pointer and free it where used like most other C functions. All it costs is not embedding function calls directly into argument list of other function calls, which is itself a minefield with C's undefined order of argument evaluation.</p>
<p>More importantly though, using <code>static</code> in <code>dlopen</code>'d modules is particularly a bad idea, not only because of the real leak upon unloading/reloading the plugin, but also because static variables may not be properly reinitialized on subsequent re-loading of the plugin (depends on <code>RTLD_NODELETE</code> and likely other flags), so this could result in some kinds of weird double-frees or similar memory corruption, in theory. It's just asking for trouble, IMO.</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-plugins/pull/755#discussion_r195600055">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABDrJ03S8ZgSu8LINrikXzc6OCSZ_YJ4ks5t8vFPgaJpZM4UoB3u">mute the thread</a>.<img src="https://github.com/notifications/beacon/ABDrJ7C0B9GP-LeyfTszSamH1O7AyhPBks5t8vFPgaJpZM4UoB3u.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-plugins/pull/755#discussion_r195600055","url":"https://github.com/geany/geany-plugins/pull/755#discussion_r195600055","name":"View Pull Request"},"description":"View this Pull Request on GitHub","publisher":{"@type":"Organization","name":"GitHub","url":"https://github.com"}}</script>
<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/geany/geany-plugins","title":"geany/geany-plugins","subtitle":"GitHub repository","main_image_url":"https://assets-cdn.github.com/images/email/message_cards/header.png","avatar_image_url":"https://assets-cdn.github.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/geany/geany-plugins"}},"updates":{"snippets":[{"icon":"PERSON","message":"@codebrainz commented on #755"}],"action":{"name":"View Pull Request","url":"https://github.com/geany/geany-plugins/pull/755#discussion_r195600055"}}}</script>
<script type="application/ld+json">{
"@type": "MessageCard",
"@context": "http://schema.org/extensions",
"hideOriginalBody": "false",
"originator": "AF6C5A86-E920-430C-9C59-A73278B5EFEB",
"title": "@codebrainz commented on 755",
"sections": [
{
"text": "",
"activityTitle": "**Matthew Brush**",
"activityImage": "https://assets-cdn.github.com/images/email/message_cards/avatar.png",
"activitySubtitle": "@codebrainz",
"facts": [

]
}
],
"potentialAction": [
{
"targets": [
{
"os": "default",
"uri": "https://github.com/geany/geany-plugins/pull/755#discussion_r195600055"
}
],
"@type": "OpenUri",
"name": "View on GitHub"
},
{
"name": "Unsubscribe",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"MuteNotification\",\n\"threadId\": 346037742\n}"
}
],
"themeColor": "26292E"
}</script>