btrfs-progs: free path on read_chunk_tree error
authorZach Brown <zab@redhat.com>
Tue, 22 Jan 2013 23:52:17 +0000 (15:52 -0800)
committerZach Brown <zab@redhat.com>
Wed, 6 Feb 2013 00:09:39 +0000 (16:09 -0800)
Path allocation failure already has its own return, remember to free the
path when the error label is taken.

Signed-off-by: Zach Brown <zab@redhat.com>
volumes.c

index 65986e1..e470bd1 100644 (file)
--- a/volumes.c
+++ b/volumes.c
@@ -1601,9 +1601,9 @@ again:
                goto again;
        }
 
-       btrfs_free_path(path);
        ret = 0;
 error:
+       btrfs_free_path(path);
        return ret;
 }