beaglelogic: fixup memory leak in the TCP command send routine
Release allocated memory in an error code path. This was reported by clang's scan-build.
This commit is contained in:
parent
f6c685e4d3
commit
71f2000bfb
|
@ -107,6 +107,7 @@ static int beaglelogic_tcp_send_cmd(struct dev_context *devc,
|
|||
|
||||
if (out < 0) {
|
||||
sr_err("Send error: %s", g_strerror(errno));
|
||||
g_free(buf);
|
||||
return SR_ERR;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue