[Github-comments] [geany-plugins] Add new "Lineoperations" plugin (#324)
Colomban Wendling
notifications at xxxxx
Sun Jan 10 02:11:44 UTC 2016
> + for(j = 0; lines[i][j] != '\0'; j++)
> + newfile[nfposn++] = lines[i][j];
> + k = i;
> + }
> +
> + newfile[nfposn] = '\0';
> + sci_set_text(doc->editor->sci, newfile); // set new document
> +
> + }
> +
> +
> + // free used memory
> + for(i = 0; i < numlines; i++)
> + if(lines[i]) g_free(lines[i]);
> + if(lines) g_free(lines);
> + if(newfile) g_free(newfile);
`g_free()` (like `free()`) is `NULL`-safe, no need for the test
---
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany-plugins/pull/324/files#r49270663
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20160109/3157e565/attachment.html>
More information about the Github-comments
mailing list