examples/pipeline: fix memory leak
Fix memory resource free for buffer allocation failure at pipeline library build. Coverity issue: 380863, 380866 Fixes: 6bc14d9f ("examples/pipeline: add command for shared library build") 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
bc4a7f7ee0
commit
b42f3e2f5b
@ -641,7 +641,7 @@ cmd_pipeline_libbuild(char **tokens,
|
||||
buffer = malloc(MAX_LINE_SIZE);
|
||||
if (!buffer) {
|
||||
snprintf(out, out_size, MSG_OUT_OF_MEMORY);
|
||||
return;
|
||||
goto free;
|
||||
}
|
||||
|
||||
snprintf(buffer,
|
||||
|
Loading…
x
Reference in New Issue
Block a user