mirror of https://github.com/sipwise/rtpengine.git
Check what the `sockaddr_parse_any_str()` parsing function returns and react accordingly. Fixes a defect spotted by Coverity Scan: *** CID 1599965: Error handling issues (CHECKED_RETURN) /daemon/redis.c: 2086 in json_restore_call() 2080 c->tos = i; 2081 redis_hash_get_time_t(&c->deleted, &call, "deleted"); 2082 redis_hash_get_time_t(&c->ml_deleted, &call, "ml_deleted"); 2083 if (!redis_hash_get_str(&id, &call, "created_from")) 2084 c->created_from = call_strdup(id.s); 2085 if (!redis_hash_get_str(&id, &call, "created_from_addr")) >>> CID 1599965: Error handling issues (CHECKED_RETURN) >>> Calling "sockaddr_parse_any_str" without checking return value (as is done elsewhere 6 out of 7 times). 2086 sockaddr_parse_any_str(&c->created_from_addr, &id); 2087 if (!redis_hash_get_int(&i, &call, "block_dtmf")) 2088 c->block_dtmf = i; 2089 if (!redis_hash_get_a64(&a64, &call, "call_flags")) 2090 c->call_flags = a64; 2091 Change-Id: I79771f9987df2e395749f05095b65e0038407e65mr13.0
parent
c87e6e7c57
commit
b8c9684d26
Loading…
Reference in new issue