Skip to content

Commit

Permalink
ofp-actions: Fix memory leak on error path.
Browse files Browse the repository at this point in the history
Need to free the memory before return. Detected by gcc10.

Signed-off-by: William Tu <[email protected]>
Reviewed-by: Yifeng Sun <[email protected]>
  • Loading branch information
williamtu committed Apr 14, 2020
1 parent 134e683 commit 9d7893b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/ofp-actions.c
Original file line number Diff line number Diff line change
Expand Up @@ -5966,6 +5966,7 @@ parse_CLONE(char *arg, const struct ofpact_parse_params *pp)
clone = pp->ofpacts->header;

if (ofpbuf_oversized(pp->ofpacts)) {
free(error);
return xasprintf("input too big");
}

Expand Down

0 comments on commit 9d7893b

Please sign in to comment.