Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't allocate args when instruction parsing fails
.. it looks like (opcode == -1) should maybe lead to an error return rather than a continue, but in any case we need to avoid leaking 'args' in this situation. .. the previous arrangement lead to compiler diagnostics when building with 'scan-build make', such as: libtvm/tvm_parser.c:186:39: warning: Potential leak of memory pointed to by 'args' for (line_idx = 0; tokens[line_idx]; line_idx++) { ^~~~~~~~ 1 warning generated.
- Loading branch information