Fix cppcheck warnings in adat.c

pull/155/head
Michael Black 2019-12-24 23:15:09 -06:00
rodzic 4e5e533248
commit 310d7efe0d
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 6599353EC683404D
1 zmienionych plików z 6 dodań i 0 usunięć

Wyświetl plik

@ -2572,6 +2572,11 @@ int adat_transaction(RIG *pRig,
nRC = adat_receive(pRig, acBuf);
}
if (pPriv->pcResult != NULL)
{
free(pPriv->pcResult);
}
pPriv->pcResult = strdup(acBuf);
}
}
@ -3515,6 +3520,7 @@ int adat_set_conf(RIG *pRig, token_t token, const char *val)
switch (token)
{
case TOKEN_ADAT_PRODUCT_NAME:
if (pPriv->pcProductName != NULL) free(pPriv->pcProductName);
pPriv->pcProductName = strdup(val);
break;