Skip to content

Commit

Permalink
btrfs-progs: close fd on return from label get/set functions
Browse files Browse the repository at this point in the history
Somehow missed these 2 in the last round.

Signed-off-by: Eric Sandeen <[email protected]>
  • Loading branch information
Eric Sandeen authored and kdave committed Mar 12, 2013
1 parent 016f6f4 commit 5bc34c6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -1217,6 +1217,7 @@ static int set_label_mounted(const char *mount_path, const char *label)
return -1;
}

close(fd);
return 0;
}

Expand Down Expand Up @@ -1274,6 +1275,7 @@ static int get_label_mounted(const char *mount_path)
}

fprintf(stdout, "%s\n", label);
close(fd);
return 0;
}

Expand Down

0 comments on commit 5bc34c6

Please sign in to comment.