]> sigrok.org Git - libsigrok.git/commit
hameg-hmo: free memory that was allocated by SCPI get routines
authorGerhard Sittig <redacted>
Sun, 16 May 2021 17:42:53 +0000 (19:42 +0200)
committerGerhard Sittig <redacted>
Sat, 22 May 2021 06:06:58 +0000 (08:06 +0200)
commit4da62209ddfa3aad12678c7141c19e9c3e8419c1
tree3fa5aed9c3244ddcc5a5274a97f5df04d1a5c5a7
parent4fad41a8a4f3e7494a935463e3172cdb4a0ff93f
hameg-hmo: free memory that was allocated by SCPI get routines

The SCPI get routines may allocate memory for response data which
callers have to free after use.

Move an existing assigment such that the initial assignment, the memory
allocation, use of response data, and resource release are in closer
proximity, and thus are easier to reason about during maintenance.
Behaviour does not change.

This is motivated by bug #1683.
src/hardware/hameg-hmo/protocol.c