Skip to content

Commit

Permalink
ovs-ofctl: Free group buckets.
Browse files Browse the repository at this point in the history
To some extent this is cosmetic because ovs-ovfctl will immediately
exit. However, it does seem to be in keeping with freeing 'gms' in
ofctl_group_mod_file().

Found by inspection using make check-valgrind.

Signed-off-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
  • Loading branch information
shorman-netronome authored and blp committed Oct 31, 2014
1 parent 042d944 commit 0da3251
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions utilities/ovs-ofctl.c
Expand Up @@ -2113,13 +2113,17 @@ ofctl_group_mod_file(int argc OVS_UNUSED, char *argv[], uint16_t command)
enum ofputil_protocol usable_protocols;
size_t n_gms = 0;
char *error;
int i;

error = parse_ofp_group_mod_file(argv[2], command, &gms, &n_gms,
&usable_protocols);
if (error) {
ovs_fatal(0, "%s", error);
}
ofctl_group_mod__(argv[1], gms, n_gms);
for (i = 0; i < n_gms; i++) {
ofputil_bucket_list_destroy(&gms[i].buckets);
}
free(gms);
}

Expand All @@ -2139,6 +2143,7 @@ ofctl_group_mod(int argc, char *argv[], uint16_t command)
ovs_fatal(0, "%s", error);
}
ofctl_group_mod__(argv[1], &gm, 1);
ofputil_bucket_list_destroy(&gm.buckets);
}
}

Expand Down

0 comments on commit 0da3251

Please sign in to comment.