if (serial_open(serial, SERIAL_RDWR) != SR_OK)
return NULL;
- serial_flush(serial);
-
buf = g_malloc(BUF_MAX);
snprintf(req, sizeof(req), "%s\r\n",
if (serial_write_blocking(serial, req, strlen(req),
serial_timeout(serial, strlen(req))) < 0) {
sr_err("Unable to send identification request.");
+ g_free(buf);
return NULL;
}
len = BUF_MAX;