[ovs-dev] [PATCH] ofp-actions: Fix memory leak.

William Tu u9012063 at gmail.com
Fri Mar 20 15:44:04 UTC 2020


On Wed, Mar 18, 2020 at 07:48:56AM -0700, Gregory Rose wrote:
> 
> 
> On 3/17/2020 4:31 PM, William Tu wrote:
> >Coverity CID 279274 reports leaking previously allocated
> >'error' buffer when 'return xasprintf("input too big");'.
> >
> >Cc: Usman Ansari <uansari at vmware.com>
> >Signed-off-by: William Tu <u9012063 at gmail.com>
> >---
> >  lib/ofp-actions.c | 1 +
> >  1 file changed, 1 insertion(+)
> >
> >diff --git a/lib/ofp-actions.c b/lib/ofp-actions.c
> >index ddef3b0c8780..ef8b2b4527f9 100644
> >--- a/lib/ofp-actions.c
> >+++ b/lib/ofp-actions.c
> >@@ -6657,6 +6657,7 @@ parse_CT(char *arg, const struct ofpact_parse_params *pp)
> >      }
> >      if (ofpbuf_oversized(pp->ofpacts)) {
> >+        free(error);
> >          return xasprintf("input too big");
> >      }
> >
> 
> Reviewed-by: Greg Rose <gvrose8192 at gmail.com>

Thanks for your review, I applied to master and 2.13.
William


More information about the dev mailing list