net/softnic: fix memory leak
Fix memory resource free for buffer allocation failure at pipeline
library build.
Coverity issue: 380975, 380977
Fixes: 0227003369
("net/softnic: add pipeline library build command")
Signed-off-by: Harshad Narayane <harshad.suresh.narayane@intel.com>
Signed-off-by: Kamalakannan R <kamalakannan.r@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
This commit is contained in:
parent
204daeea01
commit
167756c117
@ -326,7 +326,7 @@ cmd_softnic_pipeline_libbuild(struct pmd_internals *softnic __rte_unused,
|
||||
buffer = malloc(MAX_LINE_SIZE);
|
||||
if (!buffer) {
|
||||
snprintf(out, out_size, MSG_OUT_OF_MEMORY);
|
||||
return;
|
||||
goto free;
|
||||
}
|
||||
|
||||
snprintf(buffer,
|
||||
|
Loading…
Reference in New Issue
Block a user