mirror of
https://github.com/Hamlib/Hamlib.git
synced 2024-09-22 10:57:21 +00:00
Fix potential segfault in g313-posix.c
This commit is contained in:
parent
73e6ae44bd
commit
4f05f09eed
@ -115,14 +115,14 @@ int g313_init(RIG *rig)
|
||||
|
||||
priv = (struct g313_priv_data *)malloc(sizeof(struct g313_priv_data));
|
||||
|
||||
memset(priv, 0, sizeof(struct g313_priv_data));
|
||||
|
||||
if (!priv)
|
||||
{
|
||||
/* whoops! memory shortage! */
|
||||
return -RIG_ENOMEM;
|
||||
}
|
||||
|
||||
memset(priv, 0, sizeof(struct g313_priv_data));
|
||||
|
||||
priv->hWRAPI = g313_init_api();
|
||||
|
||||
if (priv->hWRAPI)
|
||||
|
Loading…
Reference in New Issue
Block a user