Skip to content

Commit

Permalink
ofp-group: Fix memory leak in error cases parsing group requests.
Browse files Browse the repository at this point in the history
Reported-at: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9424#c4
Signed-off-by: Ben Pfaff <blp@ovn.org>
  • Loading branch information
blp committed Aug 18, 2018
1 parent 7d9008e commit a2aaa63
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/ofp-group.c
Original file line number Diff line number Diff line change
Expand Up @@ -1748,7 +1748,7 @@ ofputil_decode_ofp15_group_desc_reply(struct ofputil_group_desc *gd,
msg, gd->type, OFPGC15_ADD, &gd->props,
length - sizeof *ogds - bucket_list_len);
if (error) {
ofputil_bucket_list_destroy(&gd->buckets);
ofputil_uninit_group_desc(gd);
}
return error;
}
Expand Down Expand Up @@ -2173,7 +2173,7 @@ ofputil_pull_ofp15_group_mod(struct ofpbuf *msg, enum ofp_version ofp_version,
error = parse_ofp15_group_properties(msg, gm->type, gm->command,
&gm->props, msg->size);
if (error) {
ofputil_bucket_list_destroy(&gm->buckets);
ofputil_uninit_group_mod(gm);
}
return error;
}
Expand Down

0 comments on commit a2aaa63

Please sign in to comment.