sbin/hammer: Call free(3) after uuid_to_string(3)
authorTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Mon, 23 Feb 2015 15:18:39 +0000 (00:18 +0900)
committerTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Mon, 23 Feb 2015 16:11:00 +0000 (01:11 +0900)
- Add missing free().

sbin/hammer/cmd_pseudofs.c

index 9c01d44..d764076 100644 (file)
@@ -489,8 +489,10 @@ dump_pfsd(hammer_pseudofs_data_t pfsd, int fd)
        printf("    sync-end-tid=0x%016jx\n", (uintmax_t)pfsd->sync_end_tid);
        uuid_to_string(&pfsd->shared_uuid, &str, &status);
        printf("    shared-uuid=%s\n", str);
+       free(str);
        uuid_to_string(&pfsd->unique_uuid, &str, &status);
        printf("    unique-uuid=%s\n", str);
+       free(str);
        if (pfsd->mirror_flags & HAMMER_PFSD_SLAVE) {
                printf("    slave\n");
        }