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:
Gerhard Sittig 2018-02-08 22:22:56 +01:00 committed by Uwe Hermann
parent f6c685e4d3
commit 71f2000bfb
1 changed files with 1 additions and 0 deletions

View File

@ -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;
}