i3-dump-log: explicitly free shmname

Reduces memory usage and makes LeakSanitizer more quiet.
This commit is contained in:
Michael Stapelberg 2016-01-08 20:17:34 +01:00
parent d155496915
commit 55bc2ae6a9
1 changed files with 1 additions and 0 deletions

View File

@ -138,6 +138,7 @@ int main(int argc, char *argv[]) {
if (verbose) if (verbose)
printf("next_write = %d, last_wrap = %d, logbuffer_size = %d, shmname = %s\n", printf("next_write = %d, last_wrap = %d, logbuffer_size = %d, shmname = %s\n",
header->offset_next_write, header->offset_last_wrap, header->size, shmname); header->offset_next_write, header->offset_last_wrap, header->size, shmname);
free(shmname);
walk = logbuffer + header->offset_next_write; walk = logbuffer + header->offset_next_write;
/* We first need to print old content in case there was at least one /* We first need to print old content in case there was at least one