]> www.infradead.org Git - users/hch/xfsprogs.git/commitdiff
xfs_db: free flist on error in write_struct()
authorEric Sandeen <sandeen@redhat.com>
Mon, 15 Sep 2014 23:19:37 +0000 (09:19 +1000)
committerDave Chinner <david@fromorbit.com>
Mon, 15 Sep 2014 23:19:37 +0000 (09:19 +1000)
One error path in write_struct() wasn't freeing the flist_t *fl
which was allocated, so it leaks.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
db/write.c

index 0157a44ff34c75c0c2a066f126909f69cf36365a..a0f14f46e15e0c35a4fe5aac5353f782c77053a0 100644 (file)
@@ -652,6 +652,7 @@ write_struct(
        buf = convert_arg(argv[1], bit_length);
        if (!buf) {
                dbprintf(_("unable to convert value '%s'.\n"), argv[1]);
+               flist_free(fl);
                return;
        }