Btrfs-progs: cleanup subvol_uuid_search memory in btrfs send/receive
authorStefan Behrens <sbehrens@giantdisaster.de>
Tue, 9 Apr 2013 17:08:34 +0000 (19:08 +0200)
committerDavid Sterba <dsterba@suse.cz>
Tue, 23 Apr 2013 16:56:22 +0000 (18:56 +0200)
Call the cleanup function that was introduced with the other commit.

Signed-off-by: Stefan Behrens <sbehrens@giantdisaster.de>
cmds-receive.c
cmds-send.c

index 6688d0c..fc5094e 100644 (file)
@@ -824,6 +824,7 @@ int do_receive(struct btrfs_receive *r, const char *tomnt, int r_fd)
        ret = 0;
 
 out:
+       subvol_uuid_search_finit(&r->sus);
        return ret;
 }
 
index 3ba5af6..fcde74c 100644 (file)
@@ -458,6 +458,7 @@ int cmd_send_start(int argc, char **argv)
                                goto out;
                        }
                        add_clone_source(&send, root_id);
+                       subvol_uuid_search_finit(&send.sus);
                        free(subvol);
                        full_send = 0;
                        break;
@@ -630,6 +631,7 @@ int cmd_send_start(int argc, char **argv)
 out:
        if (send.mnt_fd >= 0)
                close(send.mnt_fd);
+       subvol_uuid_search_finit(&send.sus);
        return ret;
 }