Messages in this thread |  | | Date | Sat, 30 Apr 2022 19:40:11 +0200 | From | Peter Zijlstra <> | Subject | Re: [PATCH] objtool: rework error handling in objtool_create_backup |
| |
On Sat, Apr 30, 2022 at 01:32:40PM -0400, Tom Rix wrote: > The cppcheck reports this issue > [tools/objtool/objtool.c:65]: (error) Memory leak: name > > This is a general problem. When ojbtool_create_backup() fails anywhere it > returns an error without freeing any of the buffers it allocates. So > rework the error handler to goto the appropriate free level when an error > occurs.
If it fails, objtool terminates. Process termination releases all resources.
|  |