]> sigrok.org Git - libsigrok.git/commit
scpi: document callers' responsibility to free getters' allocated memory
authorGerhard Sittig <redacted>
Sun, 16 May 2021 17:47:44 +0000 (19:47 +0200)
committerGerhard Sittig <redacted>
Sat, 22 May 2021 06:06:58 +0000 (08:06 +0200)
commit9b915e3a41311bff4d7089f564f3b2716f2004a7
tree78cbede693ffc0679670f13c270a523a363d8ab6
parent4c7296644461e39cd06f5f5fa0898a4c189f43e1
scpi: document callers' responsibility to free getters' allocated memory

Some of the SCPI getter routines allocate memory for response data which
callers need to free after use. Document this responsibility in more
places, and rephrase existing locations for consistency. See a word-diff
for the essence of the commit.

It's assumed that the separate paragraph in the function description is
better perceived than something that's hidden in the parameter or return
value discussion. Also reference the corresponding free routine by name
for callers' convenience (data types will differ among routines). Some
free routines can be called unconditionally, others require NULL checks
at the caller's.

Reported-By: Ralf <redacted>
src/scpi/scpi.c