<p>In <a href="https://github.com/geany/geany-plugins/pull/324#discussion_r49492710">lineoperations/src/linefunctions.c</a>:</p>
<pre style='color:#555'>> +    gint  numlines;         // number of lines in **lines array
> +  gchar *newfile;         // *final* string to replace current document
> +  gint  nfposn;           // keeps track of the position of newfile string
> +  gint  i;                // iterator
> +  gint  j;                // iterator
> +  gint  k;                // iterator
> +
> +  totalnumchars = sci_get_length(doc->editor->sci);
> +  totalnumlines = sci_get_line_count(doc->editor->sci);
> +  lines         = g_malloc(sizeof(gchar *) * totalnumlines);
> +  newfile       = g_malloc(sizeof(gchar) * (totalnumchars+1));
> +  numlines      = 0;
> +  nfposn        = 0;
> +  k             = 0;
> +
> +  if(newfile && lines)    // verify memory allocation
</pre>
<p>Thanks, this is now updated. I decided to keep g_malloc and remove the null check since it is unnecessary  as "GLib/GTK/Geany will most likely abort anyways.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br>Reply to this email directly or <a href="https://github.com/geany/geany-plugins/pull/324/files#r49492710">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/ABDrJ7uINmXyLQugBaeZI_EsHxg1yOiHks5pZTyugaJpZM4HBhj7.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/geany/geany-plugins/pull/324/files#r49492710"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>