On Thu, Oct 29, 2015 at 05:31:47PM +0800, Zhao Lei wrote: > comparer_set, which was allocated by malloc(), should be free before > function return. > > Signed-off-by: Zhao Lei <zhaolei@xxxxxxxxxxxxxx> > --- > cmds-qgroup.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/cmds-qgroup.c b/cmds-qgroup.c > index a64b716..f069d32 100644 > --- a/cmds-qgroup.c > +++ b/cmds-qgroup.c > @@ -290,7 +290,7 @@ static int cmd_qgroup_show(int argc, char **argv) > int filter_flag = 0; > unsigned unit_mode; > > - struct btrfs_qgroup_comparer_set *comparer_set; > + struct btrfs_qgroup_comparer_set *comparer_set = NULL; > struct btrfs_qgroup_filter_set *filter_set; > filter_set = btrfs_qgroup_alloc_filter_set(); > comparer_set = btrfs_qgroup_alloc_comparer_set(); > @@ -372,6 +372,8 @@ static int cmd_qgroup_show(int argc, char **argv) > fprintf(stderr, "ERROR: can't list qgroups: %s\n", > strerror(e)); > > + free(comparer_set); Doh, coverity correctly found that comparer_set is freed inside btrfs_show_qgroups() a few lines above. Patch dropped. > + -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html
