[user@user CutSpaces]$ valgrind --leak-check=full ./main
==27117== Memcheck, a memory error detector
==27117== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==27117== Using Valgrind-3.14.0 and LibVEX; rerun with -h for copyright info
==27117== Command: ./main
==27117==
sdlfks; dlgsd;gl ksd;gl
sdlfks;dlgsd;glksd;gl <-- Оно работает
==27117==
==27117== HEAP SUMMARY:
==27117== in use at exit: 24 bytes in 1 blocks
==27117== total heap usage: 6 allocs, 5 frees, 2,132 bytes allocated
==27117==
==27117== 24 bytes in 1 blocks are definitely lost in loss record 1 of 1
==27117== at 0x4839B65: calloc (vg_replace_malloc.c:752)
==27117== by 0x1092D1: CutSpaces (in /path/to)
==27117== by 0x1091BA: main (in /path/to)
==27117==
==27117== LEAK SUMMARY:
==27117== definitely lost: 24 bytes in 1 blocks
==27117== indirectly lost: 0 bytes in 0 blocks
==27117== possibly lost: 0 bytes in 0 blocks
==27117== still reachable: 0 bytes in 0 blocks
==27117== suppressed: 0 bytes in 0 blocks
==27117==
==27117== For counts of detected and suppressed errors, rerun with: -v
==27117== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)