mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-16 14:58:25 +00:00
chan_ooh323: Fix cppcheck warnings
Fix cppcheck warnings about redundant conditions and possible null pointer usage ASTERISK-27793 #close Reported by: Ilya Shipitsin Tested by: Ilya Shipitsin Change-Id: I0b31933b062a23331dbac9a82b8bcfe345f406f6
This commit is contained in:
@@ -2439,8 +2439,10 @@ int ooH323HandleCallFwdRequest(OOH323CallData *call)
|
||||
alias = call->pCallFwdData->aliases;
|
||||
while(alias)
|
||||
{
|
||||
pNewAlias = (ooAliases*) memAlloc(pctxt, sizeof(ooAliases));
|
||||
pNewAlias->value = (char*) memAlloc(pctxt, strlen(alias->value)+1);
|
||||
pNewAlias = (ooAliases*) memAllocZ(pctxt, sizeof(ooAliases));
|
||||
if (pNewAlias) {
|
||||
pNewAlias->value = (char*) memAllocZ(pctxt, strlen(alias->value)+1);
|
||||
}
|
||||
if(!pNewAlias || !pNewAlias->value)
|
||||
{
|
||||
OOTRACEERR3("Error:Memory - ooH323HandleCallFwdRequest - "
|
||||
|
||||
Reference in New Issue
Block a user