Commit 00f2e9bc authored by Uwe Hermann's avatar Uwe Hermann

beaglelogic: No need to check g_free() argument.

glib's g_free() function will gracefully handle NULL as input.
parent a31010b3
......@@ -215,14 +215,9 @@ static int dev_close(struct sr_dev_inst *sdi)
static void clear_helper(struct dev_context *devc)
{
if (devc->tcp_buffer)
g_free(devc->tcp_buffer);
if (devc->address)
g_free(devc->address);
if (devc->port)
g_free(devc->port);
g_free(devc->tcp_buffer);
g_free(devc->address);
g_free(devc->port);
}
static int dev_clear(const struct sr_dev_driver *di)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment