beaglelogic: No need to check g_free() argument.
glib's g_free() function will gracefully handle NULL as input.
This commit is contained in:
parent
a31010b3e4
commit
00f2e9bc6b
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue