beaglelogic: No need to check g_free() argument.

glib's g_free() function will gracefully handle NULL as input.
This commit is contained in:
Uwe Hermann 2017-09-26 19:44:01 +02:00
parent a31010b3e4
commit 00f2e9bc6b
1 changed files with 3 additions and 8 deletions

View File

@ -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)